Esempio n. 1
0
        public void Throw_Exception_When_Keyword_Is_Empty()
        {
            //Arrange
            PopularityEvaluator evaluator = new PopularityEvaluator(new MockSearchEngine());

            //Act
            List <int> result = evaluator.EvaluatePopularity("", "www.smokeball.com.au", 100);
        }
Esempio n. 2
0
        public void Throw_Exception_When_searchCount_Is_LessThan_Zero()
        {
            {
                //Arrange
                PopularityEvaluator evaluator = new PopularityEvaluator(new MockSearchEngine());

                //Act
                List <int> result = evaluator.EvaluatePopularity("conveyancing software", "www.smokeball.com.au", -1);
            }
        }
Esempio n. 3
0
        public void Throw_Exception_When_Keyword_And_URL_Are_Empty()
        {
            {
                //Arrange
                PopularityEvaluator evaluator = new PopularityEvaluator(new MockSearchEngine());

                //Act
                List <int> result = evaluator.EvaluatePopularity("", "", 100);
            }
        }
Esempio n. 4
0
        public void Throw_Exception_When_URL_Is_Empty()
        {
            {
                //Arrange
                PopularityEvaluator evaluator = new PopularityEvaluator(new MockSearchEngine());

                //Act
                List <int> result = evaluator.EvaluatePopularity("conveyancing software", "", 100);
            }
        }
Esempio n. 5
0
        public void Return_Correct_Response_When_URL_Not_Found()
        {
            //Arrange
            PopularityEvaluator evaluator = new PopularityEvaluator(new MockSearchEngine_URLNotFound());

            //Act
            List <int> result = evaluator.EvaluatePopularity("conveyancing software", "www.smokeball.com.au", 100);

            // Assert
            CollectionAssert.AreEqual(new List <int>()
            {
                0
            }, result);
        }