示例#1
0
        public void GetDivisionsTestBasic()
        {
            // Load Expected result from file
            var testResponse = File.ReadAllText(@"../../../TestAPIResponses/GetDivisionsResult.json");
            var jobj         = JObject.Parse(testResponse);
            var expected     = JsonConvert.DeserializeObject <List <Division> >(jobj["divisions"].ToString());

            // Make API web call
            List <Division> actual = api.GetDivisions().ToList();

            //Assert
            Assert.AreEqual(expected.Count, actual.Count, "Expected is not equal to Actual length.");

            for (int i = 0; i < expected.Count; i++)
            {
                Assert.AreEqual(expected[i], actual[i]);
            }
        }