Ejemplo n.º 1
0
                public async ThreadingTask IgnoresTheTimeEntryIfItWasDeleted()
                {
                    await ViewModel.Initialize();

                    var newTimeEntry = TimeEntry.DirtyDeleted(NewTimeEntry.With(DateTimeOffset.UtcNow.AddHours(1)));

                    TimeEntryCreatedSubject.OnNext(NewTimeEntry);

                    ViewModel.TimeEntries.Any(c => c.Any(te => te.Id == 21)).Should().BeFalse();
                    ViewModel.TimeEntries.Aggregate(0, (acc, te) => acc + te.Count).Should().Be(InitialAmountOfTimeEntries);
                }
Ejemplo n.º 2
0
 protected override IDatabaseTimeEntry CreateUnpublishedDeletedEntity()
 => TimeEntry.DirtyDeleted(new Ultrawave.Models.TimeEntry {
     Id = -123
 });