public void ParseDescriptionTest() { OpenOfficeDictionaries dictionaries = new OpenOfficeDictionaries("dict-en.oxt"); List<OpenOfficeDictionaryItem> list = dictionaries.GetAvailableDictionaries(); Assert.AreEqual(5, list.Count); CollectionAssert.AreEqual(new string[] { "en-GB" }, list[0].Locales); CollectionAssert.AreEqual(new string[] { "en_GB.aff", "en_GB.dic" }, list[0].Locations); }
public OpenOfficeDictionaryItem(string name, string locations, string locales, OpenOfficeDictionaries dictionaryExtension) { Name = name; locations = locations.Replace("%origin%/", ""); Locations = locations.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); Locales = locales.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); this.dictionaryExtension = dictionaryExtension; }