Example #1
0
        public async Task ShouldUpdateTrip()
        {
            var trip       = Trips.First();
            var oldComment = trip.Value.Comment;

            trip.Value.Comment = "Test update";
            var end = DateTimeOffset.Now.AddDays(10);

            trip.Value.EndDate = end;
            await TripManager.UpdateTrip(trip.Value);

            Assert.That(Trips.First().Value.Comment, Is.Not.EqualTo(oldComment));
            Assert.That(Trips.First().Value.EndDate, Is.EqualTo(end));
            Assert.That(Trips.First().Value.Id, Is.EqualTo(trip.Value.Id));
            var unused = Uow.Received(1).CommitAsync();
        }