public void Check_that_false_is_Returned_when_album_name_does_not_match_with_restricted_names() { // Arrange var names = "Karaoke, tribute"; var iSearchRuleSettings = new Mock<ISearchRuleSettings>(); iSearchRuleSettings.Setup(s => s.ForbiddenAlbumNames).Returns(names); // Act var classUnderTest = new AlbumNameIsForbiddenSearchAlbumRule(iSearchRuleSettings.Object); var result = classUnderTest.IsAlbumRestricted(album); // Assert Assert.That(result == false); }
public void Check_that_if_settings_is_empty_return_false() { // Arrange var names = string.Empty; var iSearchRuleSettings = new Mock<ISearchRuleSettings>(); iSearchRuleSettings.Setup(s => s.ForbiddenAlbumNames).Returns(names); // Act var classUnderTest = new AlbumNameIsForbiddenSearchAlbumRule(iSearchRuleSettings.Object); var result = classUnderTest.IsAlbumRestricted(album); // Assert Assert.That(result == false); }