Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        public void CheckValueInArray_CountHowManySearchTermsAppear_3()
        {
            WordToSearch newSearch = new WordToSearch("cat", "cat cat it is a cat");

            Assert.AreEqual(3, newSearch.CountTheNumberOfTimesTermAppears());
        }