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>
This commit is contained in:
committed by
GitHub
parent
90f2998088
commit
fc35476503
@ -47,9 +47,19 @@ class TimeProgress {
|
||||
bool hasStarted() =>
|
||||
DateTime.now().millisecondsSinceEpoch > startTime.millisecondsSinceEpoch;
|
||||
|
||||
int daysTillStart() {
|
||||
if (hasStarted()) throw new TimeProgressHasStartedException();
|
||||
return startTime.difference(DateTime.now()).inDays;
|
||||
}
|
||||
|
||||
bool hasEnded() =>
|
||||
DateTime.now().millisecondsSinceEpoch > endTime.millisecondsSinceEpoch;
|
||||
|
||||
int daysSinceEnd() {
|
||||
if (!hasEnded()) throw new TimeProgressHasNotEndedException();
|
||||
return DateTime.now().difference(endTime).inDays;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
id.hashCode ^ name.hashCode ^ startTime.hashCode ^ endTime.hashCode;
|
||||
|
Reference in New Issue
Block a user