示例#1
0
        public void ListServicesTest()
        {
            ContentAPI client = ConstructServiceClient();

            IEnumerable <Service> services = client.ListServices();

            Assert.AreEqual(5, services.Count());
            Assert.IsTrue(services.FirstOrDefault().Name == "Pseudo Translation");
            Assert.IsFalse(services.ToArray()[1].Name == "Translation");
            Assert.IsTrue(services.ToArray()[1].Name == "Machine Translation");
            Assert.IsTrue(services.FirstOrDefault().ServiceID == 146);
            Assert.IsTrue(services.ToArray()[1].ServiceID == 144);
        }