Esempio n. 1
0
        public void GetAllWords()
        {
            var alot = wordNet.GetAllWords();

            Assert.NotNull(alot);

            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Adjective));
            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Adverb));
            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Noun));
            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Verb));

            Assert.AreEqual(false, alot.ContainsKey(WordNetPos.None));

            Assert.Greater(alot[WordNetPos.Adjective].Count, 1);
            Assert.Greater(alot[WordNetPos.Adverb].Count, 1);
            Assert.Greater(alot[WordNetPos.Noun].Count, 1);
            Assert.Greater(alot[WordNetPos.Verb].Count, 1);
        }
Esempio n. 2
0
        public void GetAllWords()
        {
            if (wordNet == null)
            {
                throw new IgnoreException("WordNet dictionaries are not present.");
            }


            var alot = wordNet.GetAllWords();

            Assert.NotNull(alot);

            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Adjective));
            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Adverb));
            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Noun));
            Assert.AreEqual(true, alot.ContainsKey(WordNetPos.Verb));

            Assert.AreEqual(false, alot.ContainsKey(WordNetPos.None));

            Assert.Greater(alot[WordNetPos.Adjective].Count, 1);
            Assert.Greater(alot[WordNetPos.Adverb].Count, 1);
            Assert.Greater(alot[WordNetPos.Noun].Count, 1);
            Assert.Greater(alot[WordNetPos.Verb].Count, 1);
        }