time_progress_tracker/lib/models/app_exceptions.dart
Andreas Fahrecker fc35476503
Feature/widget testing (#8)
* Configured iOS Build
* Created ProgressListTile widget
* Created MaterialTesterWidget
* Created String Methods for Testing in ProgressListTile
* Created ProgressListTileStrings class
* Using Progress List Tile
* Created Progress List View
* Created Progress List Tile currently, future and past test.
* Created Progress List View one and five Time Progresses test.

Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
2021-03-08 16:19:31 +01:00

32 lines
1.0 KiB
Dart

class TimeProgressInvalidNameException implements Exception {
final invalidName;
TimeProgressInvalidNameException(this.invalidName);
String errMsg() => "The name of a TimeProgress can't be: $invalidName";
}
class TimeProgressStartTimeIsNotBeforeEndTimeException implements Exception {
final startTime;
final endTime;
TimeProgressStartTimeIsNotBeforeEndTimeException(
this.startTime, this.endTime);
String errMsg() =>
"The Start Time has to be before the end time. Therefore these values are"
" invalid: Start Time: $startTime EndTime: $endTime";
}
class TimeProgressHasStartedException implements Exception {
String errMsg() =>
"This TimeProgress has started. Therefore all calculation, which assume, "
"that the progress hasn't started yet can't be performed";
}
class TimeProgressHasNotEndedException implements Exception {
String errMsg() =>
"This TimeProgress hasn't ended. Therefore all calculation, which assume,"
" that the progress has ended already can't be performed";
}