public void WhereNotKeywords_SetsCorrectParameter_Empty() { var jobSearch = new JobSearchStub("DevKey", "api.careerbuilder.com", "", ""); jobSearch.WhereNotKeywords(" "); jobSearch.AddParametersToRequest(); var param = jobSearch.Request.Parameters.Find(qs => qs.Name == "excludekeywords"); Assert.IsNull(param, "ExcludeKeywords should not exist."); }
public void WhereNotKeywords_SetsCorrectParameter_Multiple() { var jobSearch = new JobSearchStub("DevKey", "api.careerbuilder.com", "", ""); jobSearch.WhereNotKeywords("Coca Cola", "Intel Rabbit Co"); jobSearch.AddParametersToRequest(); var param = jobSearch.Request.Parameters.Find(qs => qs.Name == "excludekeywords"); Assert.IsNotNull(param, "ExcludeKeywords should exist."); Assert.AreEqual("Coca Cola,Intel Rabbit Co", param.Value, "ExcludeKeywords value should be 'Coca Cola,Intel Rabbit Co'"); }