public void MultipleSynonymsCanMapToTheSameNoun()
        {
            var nounSynonyms = new NounSynonyms();

            nounSynonyms.Add("golden key", "key");
            nounSynonyms.Add("rusty key", "key");

            Assert.AreEqual("key", nounSynonyms.GetNounForSynonym("golden key"));
            Assert.AreEqual("key", nounSynonyms.GetNounForSynonym("rusty key"));
        }
        public void AddReturnsIFNounIsNull()
        {
            var nounSynonyms = new NounSynonyms();

            nounSynonyms.Add("test", "");
            Assert.AreEqual("", nounSynonyms.GetNounForSynonym("test"));
        }
        public void AddCreatesSynonymMappingForANoun()
        {
            var nounSynonyms = new NounSynonyms();

            nounSynonyms.Add("golden key", "key");

            Assert.AreEqual("key", nounSynonyms.GetNounForSynonym("golden key"));
        }
Beispiel #4
0
        public void AddThrowsArgumentNullExceptionIsNounIsNull()
        {
            var nounSynonyms = new NounSynonyms();

            nounSynonyms.Add("test", "");
        }