public async Task NullCigarShouldThrowException() { SqlCigarRepository repository = CreateRepository(); ArgumentNullException exception = await Assert.ThrowsAsync <ArgumentNullException>( () => repository.Save(null)); Assert.Equal("cigar", exception.ParamName); }
public async Task ShouldSaveProvidedCigar() { SqlCigarRepository repository = CreateRepository(); Cigar newCigar = Cigar.New(); await repository.Save(newCigar); Cigar savedCigar = await repository.Load(newCigar.Id); Assert.Equal(newCigar.Id, savedCigar.Id); }