public async void AddSnapshot_ShouldAddToDbContext() { // Arrange SetUp(); var toAdd = new LocationSnapshot { Id = 2, LocationId = 1 }; // Act var sit = new LocationSnapshotDataService(_factory); await sit.AddSnapshotAsync(toAdd); // Assert _context.Received().Add(toAdd); }
public async void AddLocation_ShouldAddToDbContext() { // Arrange SetUp(); var toAdd = new Location { Id = 2 }; var payload = new Location { Id = 2, Name = "NewLocName" }; // Act var sit = new LocationDataService(_factory); await sit.AddLocationAsync(toAdd); // Assert _context.Received().Add(toAdd); }