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); }
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); } }
public void Throw_Exception_When_Keyword_And_URL_Are_Empty() { { //Arrange PopularityEvaluator evaluator = new PopularityEvaluator(new MockSearchEngine()); //Act List <int> result = evaluator.EvaluatePopularity("", "", 100); } }
public void Throw_Exception_When_URL_Is_Empty() { { //Arrange PopularityEvaluator evaluator = new PopularityEvaluator(new MockSearchEngine()); //Act List <int> result = evaluator.EvaluatePopularity("conveyancing software", "", 100); } }
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); }