public void TextWritingSystems_HasAllWritingSystems_ReturnsTextWritingSystems() { var ws1 = new WritingSystemDefinition("fr"); ws1.IsVoice = true; RepositoryUnderTest.Set(ws1); RepositoryUnderTest.Set(new WritingSystemDefinition("de")); RepositoryUnderTest.Set(new WritingSystemDefinition("es")); Assert.IsTrue(RepositoryUnderTest.TextWritingSystems().Count() == 2); }
public static IEnumerable <string> FilterForTextLanguageTags(this IWritingSystemRepository repo, IEnumerable <string> langTagsToFilter) { var set = new HashSet <string>(repo.TextWritingSystems().Select(ws => ws.LanguageTag)); return(langTagsToFilter.Where(set.Contains)); }