public void GetSectionStudentAssociationsAsync_BasicTest() { SectionDataService srv = new SectionDataService(); string sectionId = section2; Task<JArray> task = srv.GetSectionStudentAssociationsAsync(TestProperties.AccessToken, sectionId, 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 firstSection = result.First; Debug.WriteLine(firstSection.ToString()); // verify we got an id back JToken id = firstSection.SelectToken("id", false); Assert.IsTrue(!string.IsNullOrEmpty(id.ToString())); }
public void GetSectionStudentAssociationStudentList_GradebookViewTest() { SectionDataService srv = new SectionDataService(); string sectionId = "1002a07e1d2b86d6aedacd3c15e2ba877bf52450_id"; string view = "gradebook"; JArray result = srv.GetSectionStudentAssociationStudentList(TestProperties.AccessToken, sectionId, null, null, view); // make sure we have results Assert.IsTrue(result.HasValues); // get the first student in the result set JToken firstStudent = result.First; // verify we got a student id back JToken id = firstStudent.SelectToken("id", false); Assert.IsTrue(!string.IsNullOrEmpty(id.ToString())); }
public void GetSectionStudentAssociationStudentListAsync_GradebookViewWithLimitAndOffsetTest() { SectionDataService srv = new SectionDataService(); string sectionId = section2; string view = "gradebook"; int limit = 12; int offset = 2; Task<JArray> task = srv.GetSectionStudentAssociationStudentListAsync(TestProperties.AccessToken, sectionId, limit, offset, view); 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; // verify we got a student id back JToken id = firstStudent.SelectToken("id", false); Assert.IsTrue(!string.IsNullOrEmpty(id.ToString())); }