Exemplo n.º 1
0
        public void GetConferencesTestBasic()
        {
            // Load Expected result from file
            var testResponse = File.ReadAllText(@"../../../TestAPIResponses/GetConferencesResult.json");
            var jobj         = JObject.Parse(testResponse);
            var expected     = JsonConvert.DeserializeObject <List <Conference> >(jobj["conferences"].ToString());

            // Make API web call
            List <Conference> actual = api.GetConferences().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]);
            }
        }