public void Test_ShouldWebsiteBeBlocked_NullSites()
        {
            //Arrange
            var check = new WhitelistedSiteCheck(null);

            //Act
            check.ValidateUrl("http://google.com");
        }
        public void Test_ShouldWebsiteBeBlocked_NullUrl()
        {
            //Arrange
            var check = new WhitelistedSiteCheck(new List <string>());

            //Act
            check.ValidateUrl(null);
        }
        public void Test_ShouldWebsiteBeBlocked_MultipleWords_Matches()
        {
            //Arrange
            var check = new WhitelistedSiteCheck(new List <string>()
            {
                "http://blah.com", "http://google.com"
            });

            //Act
            var result = check.ValidateUrl("http://google.com");

            //Assert
            Assert.IsFalse(result);
        }
        public void Test_ShouldWebsiteBeBlocked_SingleWord_WordMatches_DifferentCase()
        {
            //Arrange
            var check = new WhitelistedSiteCheck(new List <string>()
            {
                "http://GOOGLE.com"
            });

            //Act
            var result = check.ValidateUrl("http://google.com");

            //Assert
            Assert.IsFalse(result);
        }
        public void Test_ShouldWebsiteBeBlocked_SingleSite_DoesntMatch()
        {
            //Arrange
            var check = new WhitelistedSiteCheck(new List <string>()
            {
                "http://website.com"
            });

            //Act
            var result = check.ValidateUrl("http://google.com");

            //Assert
            Assert.IsTrue(result);
        }