Commit a9178e4
Changed files (2)
test
test/model/analyzer_test.dart
@@ -53,15 +53,13 @@ void main() {
test('should determine special days', () async {
var m = BloodPressureAnalyser([BloodPressureRecord(DateTime.fromMillisecondsSinceEpoch(100), 0, 0, 0, ''),
- BloodPressureRecord(DateTime.fromMillisecondsSinceEpoch(-2200), 0, 0, 0, ''),
+ BloodPressureRecord(DateTime.fromMillisecondsSinceEpoch(20), 0, 0, 0, ''),
BloodPressureRecord(DateTime.fromMillisecondsSinceEpoch(9000000), 0, 0, 0, ''),
BloodPressureRecord(DateTime.fromMillisecondsSinceEpoch(3124159), 0, 0, 0, ''),
]);
- expect((m.firstDay), DateTime.fromMillisecondsSinceEpoch(-2200));
+ expect((m.firstDay), DateTime.fromMillisecondsSinceEpoch(20));
expect((m.lastDay), DateTime.fromMillisecondsSinceEpoch(9000000));
});
-
- // TODO null tests, test with 1 element
});
}
\ No newline at end of file
test/ui/statistics_test.dart
@@ -16,7 +16,7 @@ void main() {
testWidgets("should report measurement count", (widgetTester) async {
await _initStatsPage(widgetTester, _allMeasurements(), [
for (int i = 1; i<51; i++) // can't safe entries at or before epoch
- BloodPressureRecord(DateTime.fromMillisecondsSinceEpoch(i), 40+i, 60+i, 30+i, 'Test comment $i'),
+ BloodPressureRecord(DateTime.fromMillisecondsSinceEpoch(1582991592 + i), 40+i, 60+i, 30+i, 'Test comment $i'),
]);
final measurementCountWidget = find.byKey(const Key('measurementCount'));
expect(measurementCountWidget, findsOneWidget);