public void Check_that_true_is_Returned_when_track_does_match_with_restricted_name() { // Arrange var names = "test"; var iSearchRuleSettings = new Mock <ISearchRuleSettings>(); iSearchRuleSettings.Setup(s => s.ForbiddenTrackNames).Returns(names); // Act var classUnderTest = new TrackNameIsForbiddenSearchTrackRule(iSearchRuleSettings.Object); var result = classUnderTest.IsTrackRestricted(track); // Assert Assert.That(result == true); }
public void Check_that_if_settings_is_empty_return_false() { // Arrange var names = string.Empty; var iSearchRuleSettings = new Mock <ISearchRuleSettings>(); iSearchRuleSettings.Setup(s => s.ForbiddenTrackNames).Returns(names); // Act var classUnderTest = new TrackNameIsForbiddenSearchTrackRule(iSearchRuleSettings.Object); var result = classUnderTest.IsTrackRestricted(track); // Assert Assert.That(result == false); }