public void CheckValueInDictionary_KeyValuePresent_true() { WordToSearch newSearch = new WordToSearch("cat", "cat cat it is a cat"); int key = newSearch.CountTheNumberOfTimesTermAppears(); string value = newSearch.PhraseToSearch; newSearch.SetDictionary(); Assert.AreEqual("cat cat it is a cat", newSearch.GetDictionary(key)); }
public ActionResult Show(int id, string phraseToSearch) { WordToSearch phrase = WordToSearch.Find(id); int theCount = phrase.CountTheNumberOfTimesTermAppears(); Dictionary <int, string> model = new Dictionary <int, string>(); model.Add(theCount, phrase.PhraseToSearch); // model.Add("Phrase", phrase.PhraseToSearch); return(View(model)); }
public void CheckValueInArray_CountHowManySearchTermsAppear_3() { WordToSearch newSearch = new WordToSearch("cat", "cat cat it is a cat"); Assert.AreEqual(3, newSearch.CountTheNumberOfTimesTermAppears()); }