public void TestThatGetFilesNotContainingTagsReturnsCorrectly() { Search.database = ObjectMother.PopulatedDatabase(); List <String> result; List <String> expected = new List <String>(); result = Search.getFilesNotContainingTags(); expected = new List <String>(); expected.Add(ObjectMother.videoFile); expected.Add(ObjectMother.animeFile); expected.Add(ObjectMother.musicFile); expected.Add(ObjectMother.soundFile); result.Sort(); expected.Sort(); Assert.AreEqual(expected, result); result = Search.getFilesNotContainingTags("mkv", "mp3", "anime", "video"); expected = new List <String>(); expected.Add(ObjectMother.soundFile); Assert.AreEqual(expected, result); result = Search.getFilesNotContainingTags("video"); expected = new List <String>(); expected.Add(ObjectMother.soundFile); expected.Add(ObjectMother.musicFile); result.Sort(); expected.Sort(); Assert.AreEqual(expected, result); result = Search.getFilesNotContainingTags("mkv", "mp3", "audio", "video"); expected = new List <String>(); Assert.AreEqual(expected, result); }
public void TestThatNoValidResultsReturnsNoResults() { Search.database = ObjectMother.PopulatedDatabase(); List <String> result; List <String> empty = new List <String>(); result = Search.getFilesWithTags("new"); Assert.AreEqual(empty, result); result = Search.getFilesContainingTags("new"); Assert.AreEqual(empty, result); result = Search.getFilesNotContainingTags("video", "mp3", "wav"); Assert.AreEqual(empty, result); }