diff --git a/test/widget_test.dart b/test/widget_test.dart index 853256d..8740c77 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -5,6 +5,7 @@ // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. +import 'package:eduapge2/home.dart'; import 'package:eduapge2/login.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -38,6 +39,20 @@ void main() { expect(prefs.get("email"), equals(username)); expect(prefs.get("password"), equals(password)); }); + + group('TimeOfDay', () { + TimeOfDay time1 = const TimeOfDay(hour: 4, minute: 20); + TimeOfDay time2 = const TimeOfDay(hour: 6, minute: 09); + test('is lesser', () => {expect(time1 < time2, true)}); + test('is lesser or equal', () => {expect(time1 <= time1, true)}); + test('is greater', () => {expect(time2 > time1, true)}); + }); + + group('DateTime', () { + DateTime parsed = DateTimeExtension.parseTime("4:20"); + test( + 'parseTime', () => {expect(parsed.hour, 4), expect(parsed.minute, 20)}); + }); } class LocalizationsInj extends StatelessWidget {