public void StartSession() { //todo:will check if there is an entry for today. if there is then it will not insert new data entry. var result = dataSave.StartTimer().Wait(); var timeEntry = repo.Fetch <TimeEntry>().OrderBy(x => x.EntryTimeStart).First(); Assert.True(timeEntry.EntryTimeStart.HasValue && !timeEntry.EntryTimeEnd.HasValue, "added wrong data"); Assert.True((timeEntry.EntryTimeStart.Value - DateTime.Now).Seconds < 2, "too much time passed between start and test."); Assert.True(result == OperationResult.OK); }
private void StartTime() { dataService.StartTimer(); }