use of com.instructure.canvasapi2.models.DiscussionParticipant in project instructure-android by instructure.
the class DiscussionTopicTest method getParticipantsMap_Size.
@Test
public void getParticipantsMap_Size() throws Exception {
DiscussionTopic topic = new DiscussionTopic();
ArrayList<DiscussionParticipant> participants = new ArrayList<>();
DiscussionParticipant participant = new DiscussionParticipant();
participant.setId(64343L);
participants.add(participant);
topic.setParticipants(participants);
assertEquals(1, topic.getParticipantsMap().size());
}
use of com.instructure.canvasapi2.models.DiscussionParticipant in project instructure-android by instructure.
the class DiscussionTopicTest method getParticipantsMap_Content.
@Test
public void getParticipantsMap_Content() throws Exception {
long id = 534234L;
DiscussionTopic topic = new DiscussionTopic();
ArrayList<DiscussionParticipant> participants = new ArrayList<>();
DiscussionParticipant participant = new DiscussionParticipant();
participant.setId(id);
participants.add(participant);
topic.setParticipants(participants);
assertEquals(id, topic.getParticipantsMap().keySet().toArray()[0]);
}
Aggregations