public void testSlideBulkUpdate() { Traitify traitify = new Traitify(_host, _publicKey, _secretKey, "v1"); Assessment assessment = createAssessment(); List<Slide> slides = listSlides(assessment.id); foreach (Slide slide in slides) { slide.response = true; slide.time_taken = 600; Assert.AreEqual(slide.completed_at, null); } slides = traitify.SetSlideBulkUpdate(assessment.id, slides); Assert.AreNotEqual(slides, null); foreach (Slide slide in slides) { Assert.AreNotEqual(slide.completed_at, null); } }
private List<Slide> updateAllSlides(String assessment_id) { Traitify traitify = new Traitify(_host, _publicKey, _secretKey, "v1"); List<Slide> slides = listSlides(assessment_id); Random rng = new Random(); Random random = new Random(); foreach (Slide slide in slides){ slide.response = (rng.Next(0, 2) > 0); slide.time_taken = 600; Assert.AreEqual(slide.completed_at, null); } return traitify.SetSlideBulkUpdate(assessment_id, slides); }