forked from eatvio/eatvio_app
feat(dependencies): add rxdart package and improve string extension methods for better handling of empty strings and gender parsing
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import 'package:eatvio_app/features/consultant/become_consultant/entities/diploma_entity.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
group('DiplomaEntity', () {
|
||||
test('создает DiplomaEntity с правильными значениями', () {
|
||||
final controller = TextEditingController();
|
||||
final date = DateTime(2024, 1, 1);
|
||||
|
||||
final entity = DiplomaEntity(
|
||||
textEditingController: controller,
|
||||
date: date,
|
||||
enableDeleteButton: true,
|
||||
);
|
||||
|
||||
expect(entity.textEditingController, controller);
|
||||
expect(entity.date, date);
|
||||
expect(entity.enableDeleteButton, isTrue);
|
||||
});
|
||||
|
||||
test('создает DiplomaEntity без даты', () {
|
||||
final controller = TextEditingController();
|
||||
|
||||
final entity = DiplomaEntity(
|
||||
textEditingController: controller,
|
||||
date: null,
|
||||
enableDeleteButton: false,
|
||||
);
|
||||
|
||||
expect(entity.date, isNull);
|
||||
expect(entity.enableDeleteButton, isFalse);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user