public void testLangListException() { IList <string> langList = DetectorFactory.GetLangList(); Assert.Throws <NotSupportedException>(() => langList.Add("hoge")); //langList.Add(1, "hoge"); }
public void testLangList() { IList <string> langList = DetectorFactory.GetLangList(); Assert.AreEqual(langList.Count, 3); Assert.AreEqual(langList[0], "en"); Assert.AreEqual(langList[1], "fr"); Assert.AreEqual(langList[2], "ja"); }
public void testFactoryFromJsonString() { DetectorFactory.Clear(); List <string> profiles = new List <string>(); profiles.Add(JSON_LANG1); profiles.Add(JSON_LANG2); DetectorFactory.LoadProfile(profiles); IList <string> langList = DetectorFactory.GetLangList(); Assert.AreEqual(langList.Count, 2); Assert.AreEqual(langList[0], "lang1"); Assert.AreEqual(langList[1], "lang2"); }