Example #1
0
        public void GetSomeMeaningToUseInAbsenseOfHeadWord_NoGlossOrMeaningInLang_GivesMessage()
        {
            var sense = new LexSense();

            sense.Gloss.SetAlternative("en", "man");
            var entry = new LexEntry();

            entry.Senses.Add(sense);
            Assert.AreEqual("man", entry.GetSomeMeaningToUseInAbsenseOfHeadWord("en"));
            Assert.AreEqual("?NoGlossOrDef?", entry.GetSomeMeaningToUseInAbsenseOfHeadWord("fr"));
        }
Example #2
0
        public void GetSomeMeaningToUseInAbsenseOfHeadWord_MultipleGlosses_GivesRequestedOne()
        {
            var sense = new LexSense();

            sense.Gloss.SetAlternative("en", "man");
            sense.Gloss.SetAlternative("fr", "homme");
            var entry = new LexEntry();

            entry.Senses.Add(sense);
            Assert.AreEqual("man", entry.GetSomeMeaningToUseInAbsenseOfHeadWord("en"));
            Assert.AreEqual("homme", entry.GetSomeMeaningToUseInAbsenseOfHeadWord("fr"));
        }
Example #3
0
        public void GetSomeMeaningToUseInAbsenseOfHeadWord_NoDef_GivesGloss()
        {
            var sense = new LexSense();

            sense.Gloss.SetAlternative("en", "red");
            var entry = new LexEntry();

            entry.Senses.Add(sense);
            Assert.AreEqual("red", entry.GetSomeMeaningToUseInAbsenseOfHeadWord("en"));
        }
Example #4
0
        public void GetSomeMeaningToUseInAbsenseOfHeadWord_NoGloss_GivesDefinition()
        {
            var sense = new LexSense();

            sense.Definition.SetAlternative("en", "blue");
            var entry = new LexEntry();

            entry.Senses.Add(sense);
            Assert.AreEqual("blue", entry.GetSomeMeaningToUseInAbsenseOfHeadWord("en"));
        }
Example #5
0
        public void GetSomeMeaningToUseInAbsenseOfHeadWord_NoSenses_GivesMessage()
        {
            var entry = new LexEntry();

            Assert.AreEqual("?NoMeaning?", entry.GetSomeMeaningToUseInAbsenseOfHeadWord("en"));
        }