public void AlbumArtRepositoryRemoveNonExistingTest() { Assert.That(File.Exists(Path.Combine("art", "1")), Is.False); var art = new Art{ ArtId = 1 }; var target = new AlbumArtRepository("art"); target.Remove(new AlbumArt { AlbumId = 1 }); Assert.That(File.Exists(Path.Combine("art", "1")), Is.False); }
public void AlbumArtRepositoryRemoveExistingTest() { var fs = File.Open(Path.Combine("art", 1.ToString()), FileMode.Create); fs.Close(); var art = new Art{ ArtId = 1 }; var target = new AlbumArtRepository("art"); target.Remove(new AlbumArt { AlbumId = 1 }); Assert.That(File.Exists(Path.Combine("art", "1")), Is.False); }