/** Method createParticipants */ private void createParticipants() { List<R4EParticipant> participants = new ArrayList<R4EParticipant>(1); R4EParticipant participant = RModelFactory.eINSTANCE.createR4EParticipant(); participant.setId(TestConstants.PARTICIPANT_TEST_ID); participant.setEmail(TestConstants.PARTICIPANT_TEST_EMAIL); participants.add(participant); fParticipant = fProxy .getParticipantProxy() .createParticipant(fReview.getParticipantContainer(), participants); Assert.assertNotNull(fParticipant); Assert.assertEquals(TestConstants.PARTICIPANT_TEST_ID, fParticipant.getParticipant().getId()); Assert.assertEquals( TestConstants.PARTICIPANT_TEST_EMAIL, fParticipant.getParticipant().getEmail()); Assert.assertEquals(R4EUserRole.REVIEWER, fParticipant.getParticipant().getRoles().get(0)); }
/** Method createReviews */ private void createReviews() { // Update Review Group handle for (IR4EUIModelElement elem : R4EUIModelController.getRootElement().getChildren()) { if (fGroupName.equals(elem.getName())) { fGroup = (R4EUIReviewGroup) elem; } } if (!fGroup.isOpen()) { fProxy.getCommandProxy().openElement(fGroup); } Assert.assertTrue(fGroup.isOpen()); fReview = fProxy .getReviewProxy() .createReview( fGroup, TestConstants.REVIEW_TEST_TYPE_INFORMAL, TestConstants.REVIEW_TEST_NAME_INF, TestConstants.REVIEW_TEST_DESCRIPTION, TestConstants.REVIEW_TEST_DUE_DATE, TestConstants.REVIEW_TEST_PROJECT, TestConstants.REVIEW_TEST_COMPONENTS, TestConstants.REVIEW_TEST_ENTRY_CRITERIA, TestConstants.REVIEW_TEST_OBJECTIVES, TestConstants.REVIEW_TEST_REFERENCE_MATERIALS); Assert.assertNotNull(fReview); Assert.assertNotNull(fReview.getParticipantContainer()); Assert.assertNotNull(fReview.getAnomalyContainer()); Assert.assertEquals(TestConstants.REVIEW_TEST_TYPE_INFORMAL, fReview.getReview().getType()); Assert.assertEquals(TestConstants.REVIEW_TEST_NAME_INF, fReview.getReview().getName()); Assert.assertEquals(TestConstants.REVIEW_TEST_DESCRIPTION, fReview.getReview().getExtraNotes()); Assert.assertEquals(TestConstants.REVIEW_TEST_DUE_DATE, fReview.getReview().getDueDate()); Assert.assertEquals(TestConstants.REVIEW_TEST_PROJECT, fReview.getReview().getProject()); for (int i = 0; i < TestConstants.REVIEW_TEST_COMPONENTS.length; i++) { Assert.assertEquals( TestConstants.REVIEW_TEST_COMPONENTS[i], fReview.getReview().getComponents().get(i)); } Assert.assertEquals( TestConstants.REVIEW_TEST_ENTRY_CRITERIA, fReview.getReview().getEntryCriteria()); Assert.assertEquals(TestConstants.REVIEW_TEST_OBJECTIVES, fReview.getReview().getObjectives()); Assert.assertEquals( TestConstants.REVIEW_TEST_REFERENCE_MATERIALS, fReview.getReview().getReferenceMaterial()); Assert.assertTrue(fReview.isOpen()); }