public async Task AddAsync_DoesNothing_When_objects_areEmpty() { // Arrange sut = new KeylessRepository(_db); // Act await sut.AddAsync(new Trillig[] { }); // Assert bool result = _db.Trilligs.Any(x => x.Name == "Z"); Assert.False(result); }
public async Task AddAsync_PersistsValuesTo_DataStore() { // Arrange Trillig toAdd = new Trillig() { Name = "F", BrotherName = "No Brother" }; sut = new KeylessRepository(_db); // Act await sut.AddAsync(toAdd); // Assert bool result = _db.Trilligs.Any(x => x.Name == "F"); Assert.True(result); }