Пример #1
0
        public void Check_that_false_is_returned_when_artist_name_is_one_of_the_restricted_names()
        {
            // Arrange
            var names = "Cyrus,name";
            var iSearchRuleSettings = new Mock <ISearchRuleSettings>();

            iSearchRuleSettings.Setup(s => s.ForbiddenArtistNames).Returns(names);

            // Act
            var classUnderTest = new ArtistNameIsForbiddenSearchArtistRule(iSearchRuleSettings.Object);
            var result         = classUnderTest.IsArtistRestricted(artist);

            // Assert
            Assert.That(result == true);
        }
Пример #2
0
        public void Check_that_if_settings_is_empty_return_false()
        {
            // Arrange
            var names = string.Empty;
            var iSearchRuleSettings = new Mock <ISearchRuleSettings>();

            iSearchRuleSettings.Setup(s => s.ForbiddenArtistNames).Returns(names);

            // Act
            var classUnderTest = new ArtistNameIsForbiddenSearchArtistRule(iSearchRuleSettings.Object);
            var result         = classUnderTest.IsArtistRestricted(artist);

            // Assert
            Assert.That(result == false);
        }