use of com.instructure.canvasapi2.models.DiscussionTopicHeader in project instructure-android by instructure.
the class DiscussionTopicHeaderTest method convertToDiscussionEntryTest_Null.
@Test
public void convertToDiscussionEntryTest_Null() throws Exception {
DiscussionTopicHeader header = new DiscussionTopicHeader();
assertNotNull(header.convertToDiscussionEntry("localized_graded", "localized_points"));
}
use of com.instructure.canvasapi2.models.DiscussionTopicHeader in project instructure-android by instructure.
the class DiscussionTopicHeaderTest method convertToDiscussionEntryTest_Description.
@Test
public void convertToDiscussionEntryTest_Description() throws Exception {
String localized_graded = "Graded discussion";
DiscussionTopicHeader header = new DiscussionTopicHeader();
Assignment assignment = new Assignment();
header.setAssignment(assignment);
DiscussionEntry entry = header.convertToDiscussionEntry(localized_graded, "points");
assertEquals(localized_graded, entry.getDescription());
}
use of com.instructure.canvasapi2.models.DiscussionTopicHeader in project instructure-android by instructure.
the class DiscussionTopicHeaderTest method getStatusTest_Read.
@Test
public void getStatusTest_Read() throws Exception {
DiscussionTopicHeader discussionTopicHeader = new DiscussionTopicHeader();
discussionTopicHeader.setReadState("read");
assertEquals(DiscussionTopicHeader.ReadState.READ, discussionTopicHeader.getStatus());
}
use of com.instructure.canvasapi2.models.DiscussionTopicHeader in project instructure-android by instructure.
the class DiscussionTopicHeaderTest method convertToDiscussionEntryTest_ParentID.
@Test
public void convertToDiscussionEntryTest_ParentID() throws Exception {
DiscussionTopicHeader header = new DiscussionTopicHeader();
DiscussionEntry entry = header.convertToDiscussionEntry("grade", "points");
assertEquals(-1, entry.getParentId());
}
use of com.instructure.canvasapi2.models.DiscussionTopicHeader in project instructure-android by instructure.
the class DiscussionTopicHeaderTest method getStatusTest_Other.
@Test
public void getStatusTest_Other() throws Exception {
DiscussionTopicHeader discussionTopicHeader = new DiscussionTopicHeader();
discussionTopicHeader.setReadState("anything_else");
assertEquals(DiscussionTopicHeader.ReadState.UNREAD, discussionTopicHeader.getStatus());
}
Aggregations