forked from eatvio/eatvio_app
38 lines
1.0 KiB
Dart
38 lines
1.0 KiB
Dart
import 'package:eatvio_app/features/diary/models/consultant_review_model.dart';
|
||
import 'package:flutter_test/flutter_test.dart';
|
||
|
||
void main() {
|
||
group('ConsultantReviewModel', () {
|
||
test('создает ConsultantReviewModel с правильными значениями', () {
|
||
final comments = ConsultantComments(
|
||
dayComment: 'Day comment',
|
||
mealsComments: [
|
||
MealComment(
|
||
comment: 'Meal comment',
|
||
typeNo: 1,
|
||
),
|
||
],
|
||
portionsComments: [
|
||
PortionComment(
|
||
portionId: 1,
|
||
comment: 'Portion comment',
|
||
),
|
||
],
|
||
);
|
||
|
||
final model = ConsultantReviewModel(
|
||
planName: 'Test Plan',
|
||
planDuration: 30,
|
||
currentPlanDay: 5,
|
||
consultantComments: comments,
|
||
);
|
||
|
||
expect(model.planName, 'Test Plan');
|
||
expect(model.planDuration, 30);
|
||
expect(model.currentPlanDay, 5);
|
||
expect(model.consultantComments.dayComment, 'Day comment');
|
||
});
|
||
});
|
||
}
|
||
|