public void GetEntriesWithMatchingGlossSortedByLexicalForm_EntryHasNoLexicalFormInWritingSystem_ReturnsNullForThatEntry() { using (var env = new TestEnvironment()) { LanguageForm glossToMatch = new LanguageForm("de", "de Gloss", new MultiText()); env.CreateEntryWithLexicalFormAndGloss(glossToMatch, "en", "en LexicalForm2"); var lexicalFormWritingSystem = WritingSystemDefinitionForTest("fr"); var matches = env.Repository.GetEntriesWithMatchingGlossSortedByLexicalForm(glossToMatch, lexicalFormWritingSystem); Assert.AreEqual(null, matches[0]["Form"]); } }
public void GetEntriesWithMatchingGlossSortedByLexicalForm_TwoEntriesWithSameGlossButDifferentLexicalForms_ReturnsListSortedByLexicalForm() { using (var env = new TestEnvironment()) { LanguageForm glossToMatch = new LanguageForm("de", "de Gloss", new MultiText()); env.CreateEntryWithLexicalFormAndGloss(glossToMatch, "en", "en LexicalForm2"); env.CreateEntryWithLexicalFormAndGloss(glossToMatch, "en", "en LexicalForm1"); var lexicalFormWritingSystem = WritingSystemDefinitionForTest("en"); var matches = env.Repository.GetEntriesWithMatchingGlossSortedByLexicalForm(glossToMatch, lexicalFormWritingSystem); Assert.AreEqual("en LexicalForm1", matches[0]["Form"]); Assert.AreEqual("en LexicalForm2", matches[1]["Form"]); } }