Files
eatvio_app/test/features/diary/models/consultant_review_model_test.dart

38 lines
1.0 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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');
});
});
}