Ejemplo n.º 1
0
        public void GetStudentsAsync_BasicTest()
        {
            StudentDataService srv = new StudentDataService();
            Task<JArray> task = srv.GetStudentsAsync(TestProperties.AccessToken, 0, 0);
            task.Wait();
            JArray result = task.Result;

            // make sure we have results
            Assert.IsTrue(result.HasValues);

            // get the first student in the result set
            JToken firstStudent = result.First;
            Debug.WriteLine(firstStudent.ToString());

            // verify we got an id back
            JToken id = firstStudent.SelectToken("id", false);
            Assert.IsTrue(!string.IsNullOrEmpty(id.ToString()));
        }