Exemple #1
0
        public void Find_QueryHasDIfferentCase_StillFinds()
        {
            MultiText x = new MultiText();

            x["aBc"] = "alpha";
            Assert.AreSame("alpha", x.Find("AbC").Form);
            Assert.AreSame(x.Find("aBc"), x.Find("AbC"));
        }
Exemple #2
0
		public void MergedGuyHasCorrectParentsOnForms()
		{
			MultiText x = new MultiText();
			x["a"] = "alpha";
			MultiText y = new MultiText();
			y["b"] = "beta";
			x.MergeIn(y);
			Assert.AreSame(y, y.Find("b").Parent);
			Assert.AreSame(x, x.Find("b").Parent);
		}
Exemple #3
0
        public void MergedGuyHasCorrectParentsOnForms()
        {
            MultiText x = new MultiText();

            x["a"] = "alpha";
            MultiText y = new MultiText();

            y["b"] = "beta";
            x.MergeIn(y);
            Assert.AreSame(y, y.Find("b").Parent);
            Assert.AreSame(x, x.Find("b").Parent);
        }
Exemple #4
0
        public LanguageForm GetHeadWord(string writingSystemId)
        {
            if (string.IsNullOrEmpty(writingSystemId))
            {
                throw new ArgumentException("writingSystemId");
            }
            MultiText    citationMT = GetProperty <MultiText>(WellKnownProperties.Citation);
            LanguageForm headWord;

            if (citationMT == null || (headWord = citationMT.Find(writingSystemId)) == null)
            {
                headWord = LexicalForm.Find(writingSystemId);
            }
            return(headWord);
        }