Example #1
0
        public void TestGetLanguagesInCountry()
        {
            Ethnologue eth = new Ethnologue();
            List <Ethnologue.Names> res = eth.GetLanguagesInCountry("United States", true);

            Assert.GreaterOrEqual(res.Count, 190);             // This number is not as stable as the test seems to expect it may fail after an Ethnologue update
            Assert.LessOrEqual(res.Count, 250);
            Assert.AreEqual("aaq", res[0].EthnologueCode);

            List <Ethnologue.Names> res2 = eth.GetLanguagesInCountry("United States", false);

            Assert.GreaterOrEqual(res2.Count, 900);             // This number is not as stable as the test seems to expect it may fail after an Ethnologue update
            Assert.NotNull(res2.Find(name => name.EthnologueCode == "eng"), "English is no longer spoken in the US?");
        }
Example #2
0
        public void TestGetLanguagesInCountry()
        {
            Ethnologue eth = new Ethnologue();
            List <Ethnologue.Names> res = eth.GetLanguagesInCountry("United States", true);

            Assert.GreaterOrEqual(res.Count, 200);
            Assert.LessOrEqual(res.Count, 250);
            Assert.AreEqual("aaq", res[0].EthnologueCode);

            List <Ethnologue.Names> res2 = eth.GetLanguagesInCountry("United States", false);

            Assert.GreaterOrEqual(res2.Count, 1000);
            Assert.AreEqual("eng", res2[0].EthnologueCode);
            Assert.AreEqual("AAVE", res2[0].LangName);
        }
Example #3
0
		public void TestGetLanguagesInCountry()
		{
			Ethnologue eth = new Ethnologue();
			List<Ethnologue.Names> res = eth.GetLanguagesInCountry("United States", true);
			Assert.GreaterOrEqual(res.Count, 200);
			Assert.LessOrEqual(res.Count, 250);
			Assert.AreEqual("aaq", res[0].EthnologueCode);

			List<Ethnologue.Names> res2 = eth.GetLanguagesInCountry("United States", false);
			Assert.GreaterOrEqual(res2.Count, 1000);
			Assert.AreEqual("eng", res2[0].EthnologueCode);
			Assert.AreEqual("AAVE", res2[0].LangName);
		}