Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.reviews.r4e.ui.tests/src/org/eclipse/mylyn/reviews/r4e/ui/tests/sanity/SanityInformalTests.java')
-rw-r--r--org.eclipse.mylyn.reviews.r4e.ui.tests/src/org/eclipse/mylyn/reviews/r4e/ui/tests/sanity/SanityInformalTests.java486
1 files changed, 310 insertions, 176 deletions
diff --git a/org.eclipse.mylyn.reviews.r4e.ui.tests/src/org/eclipse/mylyn/reviews/r4e/ui/tests/sanity/SanityInformalTests.java b/org.eclipse.mylyn.reviews.r4e.ui.tests/src/org/eclipse/mylyn/reviews/r4e/ui/tests/sanity/SanityInformalTests.java
index 5ad417c1..465d3b00 100644
--- a/org.eclipse.mylyn.reviews.r4e.ui.tests/src/org/eclipse/mylyn/reviews/r4e/ui/tests/sanity/SanityInformalTests.java
+++ b/org.eclipse.mylyn.reviews.r4e.ui.tests/src/org/eclipse/mylyn/reviews/r4e/ui/tests/sanity/SanityInformalTests.java
@@ -12,7 +12,7 @@
*
* Contributors:
* Jacques Bouthillier - Created for Mylyn Review R4E project
- *
+ * Francois Chouinard - Add identifying message to each assert
******************************************************************************/
package org.eclipse.mylyn.reviews.r4e.ui.tests.sanity;
@@ -21,7 +21,6 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
@@ -54,6 +53,7 @@ import org.eclipse.mylyn.reviews.r4e.ui.internal.sorters.ReviewTypeComparator;
import org.eclipse.mylyn.reviews.r4e.ui.internal.utils.R4EUIConstants;
import org.eclipse.mylyn.reviews.r4e.ui.tests.R4ETestSetup;
import org.eclipse.mylyn.reviews.r4e.ui.tests.proxy.R4EUITestMain;
+import org.eclipse.mylyn.reviews.r4e.ui.tests.utils.R4EAssert;
import org.eclipse.mylyn.reviews.r4e.ui.tests.utils.TestConstants;
import org.eclipse.mylyn.reviews.r4e.ui.tests.utils.TestUtils;
import org.junit.After;
@@ -62,7 +62,7 @@ import org.junit.Before;
/**
* @author lmcbout
*/
-@SuppressWarnings("restriction")
+@SuppressWarnings({ "restriction", "nls" })
public class SanityInformalTests extends TestCase {
// ------------------------------------------------------------------------
@@ -96,7 +96,7 @@ public class SanityInformalTests extends TestCase {
private int fAnomalyFileIndex;
// ------------------------------------------------------------------------
- // Methods
+ // Housekeeping
// ------------------------------------------------------------------------
/**
@@ -116,8 +116,8 @@ public class SanityInformalTests extends TestCase {
*
* @throws java.lang.Exception
*/
- @Override
@Before
+ @Override
public void setUp() throws Exception {
fProxy = R4EUITestMain.getInstance();
createReviewGroups();
@@ -131,12 +131,16 @@ public class SanityInformalTests extends TestCase {
*
* @throws java.lang.Exception
*/
- @Override
@After
+ @Override
public void tearDown() throws Exception {
fProxy = null;
}
+ // ------------------------------------------------------------------------
+ // Main test case
+ // ------------------------------------------------------------------------
+
/**
* Method testInformalReviews
*
@@ -159,14 +163,22 @@ public class SanityInformalTests extends TestCase {
verifySorters();
}
+ // ------------------------------------------------------------------------
+ // Helper functions
+ // ------------------------------------------------------------------------
+
/**
* Method createReviewGroups
*/
private void createReviewGroups() {
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createReviewGroups");
+
fGroup = null;
- //Create Review Group
+ // Create Review Group
+ r4eAssert.setTest("Create Review Group");
for (R4EUIReviewGroup group : R4EUIModelController.getRootElement().getGroups()) {
if (group.getReviewGroup().getName().equals(TestConstants.REVIEW_GROUP_TEST_NAME)) {
fGroup = group;
@@ -180,20 +192,21 @@ public class SanityInformalTests extends TestCase {
TestConstants.REVIEW_GROUP_TEST_NAME, TestConstants.REVIEW_GROUP_TEST_DESCRIPTION,
TestConstants.REVIEW_GROUP_TEST_ENTRY_CRITERIA, TestConstants.REVIEW_GROUP_TEST_AVAILABLE_PROJECTS,
TestConstants.REVIEW_GROUP_TEST_AVAILABLE_COMPONENTS, new String[0]);
- Assert.assertNotNull(fGroup);
- Assert.assertEquals(TestConstants.REVIEW_GROUP_TEST_NAME, fGroup.getReviewGroup().getName());
- Assert.assertEquals(new Path(TestUtils.FSharedFolder).toPortableString() + "/"
+ r4eAssert.assertNotNull(fGroup);
+ r4eAssert.assertEquals(TestConstants.REVIEW_GROUP_TEST_NAME, fGroup.getReviewGroup().getName());
+ r4eAssert.assertEquals(new Path(TestUtils.FSharedFolder).toPortableString() + "/"
+ TestConstants.REVIEW_GROUP_TEST_NAME, fGroup.getReviewGroup().getFolder());
- Assert.assertEquals(TestConstants.REVIEW_GROUP_TEST_DESCRIPTION, fGroup.getReviewGroup().getDescription());
- Assert.assertEquals(TestConstants.REVIEW_GROUP_TEST_ENTRY_CRITERIA, fGroup.getReviewGroup()
+ r4eAssert.assertEquals(TestConstants.REVIEW_GROUP_TEST_DESCRIPTION, fGroup.getReviewGroup()
+ .getDescription());
+ r4eAssert.assertEquals(TestConstants.REVIEW_GROUP_TEST_ENTRY_CRITERIA, fGroup.getReviewGroup()
.getDefaultEntryCriteria());
for (int i = 0; i < TestConstants.REVIEW_GROUP_TEST_AVAILABLE_PROJECTS.length; i++) {
- Assert.assertEquals(TestConstants.REVIEW_GROUP_TEST_AVAILABLE_PROJECTS[i], fGroup.getReviewGroup()
+ r4eAssert.assertEquals(TestConstants.REVIEW_GROUP_TEST_AVAILABLE_PROJECTS[i], fGroup.getReviewGroup()
.getAvailableProjects()
.get(i));
}
for (int i = 0; i < TestConstants.REVIEW_GROUP_TEST_AVAILABLE_COMPONENTS.length; i++) {
- Assert.assertEquals(TestConstants.REVIEW_GROUP_TEST_AVAILABLE_COMPONENTS[i], fGroup.getReviewGroup()
+ r4eAssert.assertEquals(TestConstants.REVIEW_GROUP_TEST_AVAILABLE_COMPONENTS[i], fGroup.getReviewGroup()
.getAvailableComponents()
.get(i));
}
@@ -201,11 +214,20 @@ public class SanityInformalTests extends TestCase {
}
}
+ // ------------------------------------------------------------------------
+ // Create Review Tests
+ // ------------------------------------------------------------------------
+
/**
* Method createReviews
*/
private void createReviews() {
- //Update Review Group handle
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createReviews");
+
+ // Update Review Group handle
+ r4eAssert.setTest("Update Review Group Handle");
for (IR4EUIModelElement elem : R4EUIModelController.getRootElement().getChildren()) {
if (fGroupName.equals(elem.getName())) {
fGroup = (R4EUIReviewGroup) elem;
@@ -214,36 +236,47 @@ public class SanityInformalTests extends TestCase {
if (!fGroup.isOpen()) {
fProxy.getCommandProxy().openElement(fGroup);
}
- Assert.assertTrue(fGroup.isOpen());
+ r4eAssert.assertTrue(fGroup.isOpen());
+ r4eAssert.setTest("Create Review");
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());
+ r4eAssert.assertNotNull(fReview);
+ r4eAssert.assertNotNull(fReview.getParticipantContainer());
+ r4eAssert.assertNotNull(fReview.getAnomalyContainer());
+ r4eAssert.assertEquals(TestConstants.REVIEW_TEST_TYPE_INFORMAL, fReview.getReview().getType());
+ r4eAssert.assertEquals(TestConstants.REVIEW_TEST_NAME_INF, fReview.getReview().getName());
+ r4eAssert.assertEquals(TestConstants.REVIEW_TEST_DESCRIPTION, fReview.getReview().getExtraNotes());
+ r4eAssert.assertEquals(TestConstants.REVIEW_TEST_DUE_DATE, fReview.getReview().getDueDate());
+ r4eAssert.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));
+ r4eAssert.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());
+ r4eAssert.assertEquals(TestConstants.REVIEW_TEST_ENTRY_CRITERIA, fReview.getReview().getEntryCriteria());
+ r4eAssert.assertEquals(TestConstants.REVIEW_TEST_OBJECTIVES, fReview.getReview().getObjectives());
+ r4eAssert.assertEquals(TestConstants.REVIEW_TEST_REFERENCE_MATERIALS, fReview.getReview()
+ .getReferenceMaterial());
+ r4eAssert.assertTrue(fReview.isOpen());
}
+ // ------------------------------------------------------------------------
+ // Create Review Item Tests
+ // ------------------------------------------------------------------------
+
/**
* Method createReviewItems
*/
private void createReviewItems() throws CoreException {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createReviewItems");
+
+ // Close and re-open, so the validation takes de-serialized information
+ r4eAssert.setTest("Create Commit Item");
fItem = fProxy.getItemProxy().createCommitItem(TestUtils.FJavaIProject, 0);
- //close and re-open, so the validation takes de-serialized information
String itemName = fItem.getName();
fProxy.getCommandProxy().closeElement(fReview);
fProxy.getCommandProxy().openElement(fReview);
@@ -254,210 +287,237 @@ public class SanityInformalTests extends TestCase {
}
//Now validate
- Assert.assertNotNull(fItem);
- Assert.assertEquals(R4EUIModelController.getReviewer(), fItem.getItem().getAddedById());
- Assert.assertEquals("The.committer@some.com", fItem.getItem().getAuthorRep());
- Assert.assertEquals("second Java Commit", fItem.getItem().getDescription());
- Assert.assertEquals(4, fItem.getChildren().length);
+ r4eAssert.assertNotNull(fItem);
+ r4eAssert.assertEquals(R4EUIModelController.getReviewer(), fItem.getItem().getAddedById());
+ r4eAssert.assertEquals("The.committer@some.com", fItem.getItem().getAuthorRep());
+ r4eAssert.assertEquals("second Java Commit", fItem.getItem().getDescription());
+ r4eAssert.assertEquals(4, fItem.getChildren().length);
for (int i = 0; i < fItem.getChildren().length; i++) {
if (((R4EUIFileContext) fItem.getChildren()[i]).getName().equals(TestUtils.JAVA_FILE1_PROJ_NAME)) {
fAnomalyFileIndex = i; //Used later to add anomalies
- Assert.assertEquals(TestUtils.JAVA_FILE1_PROJ_NAME, fItem.getItem()
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE1_PROJ_NAME, fItem.getItem()
.getFileContextList()
.get(i)
.getBase()
.getName());
- Assert.assertEquals(TestUtils.JAVA_FILE1_PROJ_NAME, fItem.getItem()
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE1_PROJ_NAME, fItem.getItem()
.getFileContextList()
.get(i)
.getTarget()
.getName());
- Assert.assertEquals(606, ((R4ETextPosition) fItem.getItem()
+ r4eAssert.assertEquals(606, ((R4ETextPosition) fItem.getItem()
.getFileContextList()
.get(i)
.getDeltas()
.get(0)
.getTarget()
.getLocation()).getStartPosition());
- Assert.assertEquals(25,
- ((R4ETextPosition) fItem.getItem()
- .getFileContextList()
- .get(i)
- .getDeltas()
- .get(0)
- .getTarget()
- .getLocation()).getLength());
- Assert.assertEquals(665, ((R4ETextPosition) fItem.getItem()
+ r4eAssert.assertEquals(25, ((R4ETextPosition) fItem.getItem()
+ .getFileContextList()
+ .get(i)
+ .getDeltas()
+ .get(0)
+ .getTarget()
+ .getLocation()).getLength());
+ r4eAssert.assertEquals(665, ((R4ETextPosition) fItem.getItem()
.getFileContextList()
.get(i)
.getDeltas()
.get(1)
.getTarget()
.getLocation()).getStartPosition());
- Assert.assertEquals(63,
- ((R4ETextPosition) fItem.getItem()
- .getFileContextList()
- .get(i)
- .getDeltas()
- .get(1)
- .getTarget()
- .getLocation()).getLength());
- Assert.assertEquals(733, ((R4ETextPosition) fItem.getItem()
+ r4eAssert.assertEquals(63, ((R4ETextPosition) fItem.getItem()
+ .getFileContextList()
+ .get(i)
+ .getDeltas()
+ .get(1)
+ .getTarget()
+ .getLocation()).getLength());
+ r4eAssert.assertEquals(733, ((R4ETextPosition) fItem.getItem()
.getFileContextList()
.get(i)
.getDeltas()
.get(2)
.getTarget()
.getLocation()).getStartPosition());
- Assert.assertEquals(61,
- ((R4ETextPosition) fItem.getItem()
- .getFileContextList()
- .get(i)
- .getDeltas()
- .get(2)
- .getTarget()
- .getLocation()).getLength());
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotations(
+ r4eAssert.assertEquals(61, ((R4ETextPosition) fItem.getItem()
+ .getFileContextList()
+ .get(i)
+ .getDeltas()
+ .get(2)
+ .getTarget()
+ .getLocation()).getLength());
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotations(
((R4EUIFileContext) fItem.getChildren()[i]).getContentsContainerElement().getChildren(), true,
R4EUIConstants.DELTA_ANNOTATION_ID));
} else if (((R4EUIFileContext) fItem.getChildren()[i]).getName().equals(TestUtils.JAVA_FILE4_PROJ_NAME)) {
- Assert.assertNull(fItem.getItem().getFileContextList().get(i).getBase());
- Assert.assertEquals(TestUtils.JAVA_FILE4_PROJ_NAME, fItem.getItem()
+ r4eAssert.assertNull(fItem.getItem().getFileContextList().get(i).getBase());
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE4_PROJ_NAME, fItem.getItem()
.getFileContextList()
.get(i)
.getTarget()
.getName());
} else if (((R4EUIFileContext) fItem.getChildren()[i]).getName().equals(TestUtils.JAVA_FILE3_PROJ_NAME)) {
- Assert.assertNull(fItem.getItem().getFileContextList().get(i).getBase());
- Assert.assertEquals(TestUtils.JAVA_FILE3_PROJ_NAME, fItem.getItem()
+ r4eAssert.assertNull(fItem.getItem().getFileContextList().get(i).getBase());
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE3_PROJ_NAME, fItem.getItem()
.getFileContextList()
.get(i)
.getTarget()
.getName());
} else if (((R4EUIFileContext) fItem.getChildren()[i]).getName().equals(TestUtils.JAVA_FILE2_PROJ_NAME)) {
- Assert.assertEquals(TestUtils.JAVA_FILE2_PROJ_NAME, fItem.getItem()
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE2_PROJ_NAME, fItem.getItem()
.getFileContextList()
.get(i)
.getBase()
.getName());
- Assert.assertNull(fItem.getItem().getFileContextList().get(i).getTarget());
+ r4eAssert.assertNull(fItem.getItem().getFileContextList().get(i).getTarget());
}
}
+ r4eAssert.setTest("Create Manual Tree Item");
fItem2 = fProxy.getItemProxy().createManualTreeItem(TestUtils.FJavaFile3);
- Assert.assertNotNull(fItem2);
- Assert.assertEquals(R4EUIModelController.getReviewer(), fItem2.getItem().getAddedById());
- Assert.assertEquals(TestUtils.JAVA_FILE3_PROJ_NAME, fItem2.getItem()
+ r4eAssert.assertNotNull(fItem2);
+ r4eAssert.assertEquals(R4EUIModelController.getReviewer(), fItem2.getItem().getAddedById());
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE3_PROJ_NAME, fItem2.getItem()
.getFileContextList()
.get(0)
.getBase()
.getName());
- Assert.assertEquals(TestUtils.JAVA_FILE3_PROJ_NAME, fItem2.getItem()
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE3_PROJ_NAME, fItem2.getItem()
.getFileContextList()
.get(0)
.getTarget()
.getName());
- Assert.assertEquals(0, ((R4ETextPosition) fItem2.getItem()
+ r4eAssert.assertEquals(0, ((R4ETextPosition) fItem2.getItem()
.getFileContextList()
.get(0)
.getDeltas()
.get(0)
.getTarget()
.getLocation()).getStartPosition());
- Assert.assertEquals(755, ((R4ETextPosition) fItem2.getItem()
+ r4eAssert.assertEquals(755, ((R4ETextPosition) fItem2.getItem()
.getFileContextList()
.get(0)
.getDeltas()
.get(0)
.getTarget()
.getLocation()).getLength());
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotations(
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotations(
((R4EUIFileContext) fItem2.getChildren()[0]).getContentsContainerElement().getChildren(), false,
R4EUIConstants.SELECTION_ANNOTATION_ID));
+ r4eAssert.setTest("Create Manual Text Item");
fItem3 = fProxy.getItemProxy().createManualTextItem(TestUtils.FJavaFile4, 50, 20);
- Assert.assertNotNull(fItem3);
- Assert.assertEquals(R4EUIModelController.getReviewer(), fItem3.getItem().getAddedById());
- Assert.assertEquals(TestUtils.JAVA_FILE4_PROJ_NAME, fItem3.getItem()
+ r4eAssert.assertNotNull(fItem3);
+ r4eAssert.assertEquals(R4EUIModelController.getReviewer(), fItem3.getItem().getAddedById());
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE4_PROJ_NAME, fItem3.getItem()
.getFileContextList()
.get(0)
.getBase()
.getName());
- Assert.assertEquals(TestUtils.JAVA_FILE4_PROJ_NAME, fItem3.getItem()
+ r4eAssert.assertEquals(TestUtils.JAVA_FILE4_PROJ_NAME, fItem3.getItem()
.getFileContextList()
.get(0)
.getTarget()
.getName());
- Assert.assertEquals(50, ((R4ETextPosition) fItem3.getItem()
+ r4eAssert.assertEquals(50, ((R4ETextPosition) fItem3.getItem()
.getFileContextList()
.get(0)
.getDeltas()
.get(0)
.getTarget()
.getLocation()).getStartPosition());
- Assert.assertEquals(20, ((R4ETextPosition) fItem3.getItem()
+ r4eAssert.assertEquals(20, ((R4ETextPosition) fItem3.getItem()
.getFileContextList()
.get(0)
.getDeltas()
.get(0)
.getTarget()
.getLocation()).getLength());
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotations(
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotations(
((R4EUIFileContext) fItem3.getChildren()[0]).getContentsContainerElement().getChildren(), true,
R4EUIConstants.SELECTION_ANNOTATION_ID));
}
+ // ------------------------------------------------------------------------
+ // Create Participant Tests
+ // ------------------------------------------------------------------------
+
/**
* Method createParticipants
*/
private void createParticipants() {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createParticipants");
+
+ r4eAssert.setTest("Create Participant");
+
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.R4E_ROLE_REVIEWER, fParticipant.getParticipant().getRoles().get(0));
+ r4eAssert.assertNotNull(fParticipant);
+ r4eAssert.assertEquals(TestConstants.PARTICIPANT_TEST_ID, fParticipant.getParticipant().getId());
+ r4eAssert.assertEquals(TestConstants.PARTICIPANT_TEST_EMAIL, fParticipant.getParticipant().getEmail());
+ r4eAssert.assertEquals(R4EUserRole.R4E_ROLE_REVIEWER, fParticipant.getParticipant().getRoles().get(0));
}
+ // ------------------------------------------------------------------------
+ // Create Compare Editor Anomalies Tests
+ // ------------------------------------------------------------------------
+
/**
* Method createEditorAnomalies
*/
private void createCompareEditorAnomalies() {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createCompareEditorAnomalies");
+
+ r4eAssert.setTest("Create Compare Editor Anomaly");
fCompareEditorAnomaly = fProxy.getAnomalyProxy().createCompareEditorAnomaly(
fItem.getFileContexts().get(fAnomalyFileIndex), 20, 50,
TestConstants.COMPARE_EDITOR_ANOMALY_TEST_TITLE, TestConstants.COMPARE_EDITOR_ANOMALY_TEST_DESCRIPTION,
TestConstants.ANOMALY_TEST_CLASS_ERRONEOUS, TestConstants.ANOMALY_TEST_RANK_MINOR,
TestConstants.ANOMALY_TEST_DUE_DATE, TestConstants.PARTICIPANT_ASSIGN_TO, null);
- Assert.assertNotNull(fCompareEditorAnomaly);
- Assert.assertEquals(TestConstants.COMPARE_EDITOR_ANOMALY_TEST_TITLE, fCompareEditorAnomaly.getAnomaly()
+ r4eAssert.assertNotNull(fCompareEditorAnomaly);
+ r4eAssert.assertEquals(TestConstants.COMPARE_EDITOR_ANOMALY_TEST_TITLE, fCompareEditorAnomaly.getAnomaly()
.getTitle());
- Assert.assertEquals(TestConstants.COMPARE_EDITOR_ANOMALY_TEST_DESCRIPTION, fCompareEditorAnomaly.getAnomaly()
- .getDescription());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_CLASS_ERRONEOUS,
+ r4eAssert.assertEquals(TestConstants.COMPARE_EDITOR_ANOMALY_TEST_DESCRIPTION,
+ fCompareEditorAnomaly.getAnomaly().getDescription());
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_CLASS_ERRONEOUS,
((R4ECommentType) fCompareEditorAnomaly.getAnomaly().getType()).getType());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_RANK_MINOR, fCompareEditorAnomaly.getAnomaly().getRank());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_DUE_DATE, fCompareEditorAnomaly.getAnomaly().getDueDate());
- Assert.assertEquals(TestConstants.PARTICIPANT_ASSIGN_TO, fCompareEditorAnomaly.getAnomaly()
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_RANK_MINOR, fCompareEditorAnomaly.getAnomaly().getRank());
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_DUE_DATE, fCompareEditorAnomaly.getAnomaly().getDueDate());
+ r4eAssert.assertEquals(TestConstants.PARTICIPANT_ASSIGN_TO, fCompareEditorAnomaly.getAnomaly()
.getAssignedTo()
.get(0));
- Assert.assertEquals(20, ((R4ETextPosition) ((R4ETextContent) fCompareEditorAnomaly.getAnomaly()
+ r4eAssert.assertEquals(20, ((R4ETextPosition) ((R4ETextContent) fCompareEditorAnomaly.getAnomaly()
.getLocation()
.get(0)).getLocation()).getStartPosition());
- Assert.assertEquals(50, ((R4ETextPosition) ((R4ETextContent) fCompareEditorAnomaly.getAnomaly()
+ r4eAssert.assertEquals(50, ((R4ETextPosition) ((R4ETextContent) fCompareEditorAnomaly.getAnomaly()
.getLocation()
.get(0)).getLocation()).getLength());
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fCompareEditorAnomaly, true,
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fCompareEditorAnomaly, true,
R4EUIConstants.ANOMALY_OPEN_ANNOTATION_ID));
}
+ // ------------------------------------------------------------------------
+ // Create Linked Anomaly Tests
+ // ------------------------------------------------------------------------
+
/**
* Method createLinkedAnomalies
*/
private void createLinkedAnomalies() {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createLinkedAnomalies");
+
+ r4eAssert.setTest("Create Linked Anomaly");
R4EUIContent content = fItem.getFileContexts()
.get(fAnomalyFileIndex)
.getContentsContainerElement()
@@ -467,85 +527,119 @@ public class SanityInformalTests extends TestCase {
TestConstants.LINKED_ANOMALY_TEST_DESCRIPTION, TestConstants.ANOMALY_TEST_CLASS_IMPROVEMENT,
TestConstants.ANOMALY_TEST_RANK_MAJOR, TestConstants.ANOMALY_TEST_DUE_DATE,
TestConstants.PARTICIPANT_ASSIGN_TO, null);
- Assert.assertNotNull(fLinkedAnomaly);
- Assert.assertEquals(TestConstants.LINKED_ANOMALY_TEST_TITLE, fLinkedAnomaly.getAnomaly().getTitle());
- Assert.assertEquals(TestConstants.LINKED_ANOMALY_TEST_DESCRIPTION, fLinkedAnomaly.getAnomaly().getDescription());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_CLASS_IMPROVEMENT, ((R4ECommentType) fLinkedAnomaly.getAnomaly()
- .getType()).getType());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_RANK_MAJOR, fLinkedAnomaly.getAnomaly().getRank());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_DUE_DATE, fLinkedAnomaly.getAnomaly().getDueDate());
- Assert.assertEquals(TestConstants.PARTICIPANT_ASSIGN_TO, fLinkedAnomaly.getAnomaly().getAssignedTo().get(0));
- Assert.assertEquals(
+ r4eAssert.assertNotNull(fLinkedAnomaly);
+ r4eAssert.assertEquals(TestConstants.LINKED_ANOMALY_TEST_TITLE, fLinkedAnomaly.getAnomaly().getTitle());
+ r4eAssert.assertEquals(TestConstants.LINKED_ANOMALY_TEST_DESCRIPTION, fLinkedAnomaly.getAnomaly()
+ .getDescription());
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_CLASS_IMPROVEMENT,
+ ((R4ECommentType) fLinkedAnomaly.getAnomaly().getType()).getType());
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_RANK_MAJOR, fLinkedAnomaly.getAnomaly().getRank());
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_DUE_DATE, fLinkedAnomaly.getAnomaly().getDueDate());
+ r4eAssert.assertEquals(TestConstants.PARTICIPANT_ASSIGN_TO, fLinkedAnomaly.getAnomaly().getAssignedTo().get(0));
+ r4eAssert.assertEquals(
((R4EUITextPosition) content.getPosition()).getOffset(),
((R4ETextPosition) ((R4ETextContent) fLinkedAnomaly.getAnomaly().getLocation().get(0)).getLocation()).getStartPosition());
- Assert.assertEquals(
+ r4eAssert.assertEquals(
((R4EUITextPosition) content.getPosition()).getLength(),
((R4ETextPosition) ((R4ETextContent) fLinkedAnomaly.getAnomaly().getLocation().get(0)).getLocation()).getLength());
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fLinkedAnomaly, true,
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fLinkedAnomaly, true,
R4EUIConstants.ANOMALY_OPEN_ANNOTATION_ID));
}
+ // ------------------------------------------------------------------------
+ // Create External Anomaly Tests
+ // ------------------------------------------------------------------------
+
/**
* Method createExternalAnomalies
*/
private void createExternalAnomalies() {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createExternalAnomalies");
+
+ r4eAssert.setTest("Create External Anomaly");
fExternalAnomaly = fProxy.getAnomalyProxy().createExternalAnomaly(TestUtils.FJavaFile3,
TestConstants.EXTERNAL_ANOMALY_TEST_TITLE, TestConstants.EXTERNAL_ANOMALY_TEST_DESCRIPTION,
TestConstants.ANOMALY_TEST_CLASS_QUESTION, TestConstants.ANOMALY_TEST_RANK_MINOR,
TestConstants.ANOMALY_TEST_DUE_DATE, TestConstants.PARTICIPANT_ASSIGN_TO, null);
- Assert.assertNotNull(fExternalAnomaly);
- Assert.assertEquals(TestConstants.EXTERNAL_ANOMALY_TEST_TITLE, fExternalAnomaly.getAnomaly().getTitle());
- Assert.assertEquals(TestConstants.EXTERNAL_ANOMALY_TEST_DESCRIPTION, fExternalAnomaly.getAnomaly()
+ r4eAssert.assertNotNull(fExternalAnomaly);
+ r4eAssert.assertEquals(TestConstants.EXTERNAL_ANOMALY_TEST_TITLE, fExternalAnomaly.getAnomaly().getTitle());
+ r4eAssert.assertEquals(TestConstants.EXTERNAL_ANOMALY_TEST_DESCRIPTION, fExternalAnomaly.getAnomaly()
.getDescription());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_CLASS_QUESTION, ((R4ECommentType) fExternalAnomaly.getAnomaly()
- .getType()).getType());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_RANK_MINOR, fExternalAnomaly.getAnomaly().getRank());
- Assert.assertEquals(TestConstants.ANOMALY_TEST_DUE_DATE, fExternalAnomaly.getAnomaly().getDueDate());
- Assert.assertEquals(TestConstants.PARTICIPANT_ASSIGN_TO, fExternalAnomaly.getAnomaly().getAssignedTo().get(0));
- Assert.assertEquals(
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_CLASS_QUESTION,
+ ((R4ECommentType) fExternalAnomaly.getAnomaly().getType()).getType());
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_RANK_MINOR, fExternalAnomaly.getAnomaly().getRank());
+ r4eAssert.assertEquals(TestConstants.ANOMALY_TEST_DUE_DATE, fExternalAnomaly.getAnomaly().getDueDate());
+ r4eAssert.assertEquals(TestConstants.PARTICIPANT_ASSIGN_TO, fExternalAnomaly.getAnomaly()
+ .getAssignedTo()
+ .get(0));
+ r4eAssert.assertEquals(
0,
((R4ETextPosition) ((R4ETextContent) fExternalAnomaly.getAnomaly().getLocation().get(0)).getLocation()).getStartPosition());
- Assert.assertEquals(755, ((R4ETextPosition) ((R4ETextContent) fExternalAnomaly.getAnomaly()
+ r4eAssert.assertEquals(755, ((R4ETextPosition) ((R4ETextContent) fExternalAnomaly.getAnomaly()
.getLocation()
.get(0)).getLocation()).getLength());
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fExternalAnomaly, false,
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fExternalAnomaly, false,
R4EUIConstants.ANOMALY_OPEN_ANNOTATION_ID));
}
+ // ------------------------------------------------------------------------
+ // Create Comment Tests
+ // ------------------------------------------------------------------------
+
/**
* Method createComments
*/
private void createComments() {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("createComments");
+
+ r4eAssert.setTest("Create Comment");
fComment = fProxy.getCommentProxy().createComment(fLinkedAnomaly, TestConstants.COMMENT_TEST);
- Assert.assertNotNull(fComment);
- Assert.assertEquals(TestConstants.COMMENT_TEST, fComment.getComment().getDescription());
+ r4eAssert.assertNotNull(fComment);
+ r4eAssert.assertEquals(TestConstants.COMMENT_TEST, fComment.getComment().getDescription());
}
+ // ------------------------------------------------------------------------
+ // Send Question Notification Tests
+ // ------------------------------------------------------------------------
+
/**
* Method sendQuestionNotifications
*
* @throws CoreException
*/
private void sendQuestionNotifications() throws CoreException {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("sendQuestionNotifications");
+
+ r4eAssert.setTest("Send Question Notifications");
fProxy.getCommandProxy().sendQuestionNotification(fReview);
- Assert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_SOURCE, fProxy.getCommandProxy()
+ r4eAssert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_SOURCE, fProxy.getCommandProxy()
.getEmailDetails()
.getSource());
String[] destinations = fProxy.getCommandProxy().getEmailDetails().getDestinations();
for (int i = 0; i < destinations.length; i++) {
- Assert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_DESTINATIONS[i], destinations[i]);
+ r4eAssert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_DESTINATIONS[i], destinations[i]);
}
- Assert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_SUBJECT_INFORMAL, fProxy.getCommandProxy()
+ r4eAssert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_SUBJECT_INFORMAL, fProxy.getCommandProxy()
.getEmailDetails()
.getSubject());
//TODO: Assert fails, but Strings seem to be identical???
-// Assert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_BODY_INFORMAL, fProxy.getCommandProxy()
+// r4eAssert.assertEquals(TestConstants.SEND_QUESTION_REVIEW_TEST_BODY_INFORMAL, fProxy.getCommandProxy()
// .getEmailDetails()
// .getBody());
}
+ // ------------------------------------------------------------------------
+ // Progress Anomaly Tests
+ // ------------------------------------------------------------------------
+
/**
* On top of the basic scenario, we need for the INFORMAl review the following test <br>
* - Adjust the state for the anomaly <br>
@@ -558,13 +652,18 @@ public class SanityInformalTests extends TestCase {
* Method progressCompareEditorAnomalies
*/
private void progressCompareEditorAnomalies() {
- Assert.assertNotNull(fCompareEditorAnomaly);
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("progressCompareEditorAnomalies");
+
+ r4eAssert.setTest("Progress Compare Editor Anomaly");
+ r4eAssert.assertNotNull(fCompareEditorAnomaly);
fProxy.getAnomalyProxy().progressAnomaly(fCompareEditorAnomaly, TestConstants.ANOMALY_STATE_VERIFIED);
- Assert.assertEquals(TestConstants.ANOMALY_STATE_VERIFIED, fCompareEditorAnomaly.getAnomaly().getState());
- Assert.assertFalse(fProxy.getCommandProxy().verifyAnnotation(fCompareEditorAnomaly, true,
+ r4eAssert.assertEquals(TestConstants.ANOMALY_STATE_VERIFIED, fCompareEditorAnomaly.getAnomaly().getState());
+ r4eAssert.assertFalse(fProxy.getCommandProxy().verifyAnnotation(fCompareEditorAnomaly, true,
R4EUIConstants.ANOMALY_OPEN_ANNOTATION_ID));
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fCompareEditorAnomaly, true,
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fCompareEditorAnomaly, true,
R4EUIConstants.ANOMALY_CLOSED_ANNOTATION_ID));
}
@@ -572,13 +671,18 @@ public class SanityInformalTests extends TestCase {
* Method progressLinkedAnomalies
*/
private void progressLinkedAnomalies() {
- Assert.assertNotNull(fLinkedAnomaly);
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("progressLinkedAnomalies");
+
+ r4eAssert.setTest("Progress Linked Anomaly");
+ r4eAssert.assertNotNull(fLinkedAnomaly);
fProxy.getAnomalyProxy().progressAnomaly(fLinkedAnomaly, TestConstants.ANOMALY_STATE_FIXED);
- Assert.assertEquals(TestConstants.ANOMALY_STATE_FIXED, fLinkedAnomaly.getAnomaly().getState());
- Assert.assertFalse(fProxy.getCommandProxy().verifyAnnotation(fLinkedAnomaly, true,
+ r4eAssert.assertEquals(TestConstants.ANOMALY_STATE_FIXED, fLinkedAnomaly.getAnomaly().getState());
+ r4eAssert.assertFalse(fProxy.getCommandProxy().verifyAnnotation(fLinkedAnomaly, true,
R4EUIConstants.ANOMALY_OPEN_ANNOTATION_ID));
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fLinkedAnomaly, true,
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fLinkedAnomaly, true,
R4EUIConstants.ANOMALY_CLOSED_ANNOTATION_ID));
}
@@ -586,86 +690,116 @@ public class SanityInformalTests extends TestCase {
* Method progressExternalAnomalies
*/
private void progressExternalAnomalies() {
- Assert.assertNotNull(fExternalAnomaly);
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("progressExternalAnomalies");
+
+ r4eAssert.setTest("Progress External Anomaly");
+ r4eAssert.assertNotNull(fExternalAnomaly);
fProxy.getAnomalyProxy().progressAnomaly(fExternalAnomaly, TestConstants.ANOMALY_STATE_REJECTED);
- Assert.assertEquals(TestConstants.ANOMALY_STATE_REJECTED, fExternalAnomaly.getAnomaly().getState());
- Assert.assertFalse(fProxy.getCommandProxy().verifyAnnotation(fExternalAnomaly, false,
+ r4eAssert.assertEquals(TestConstants.ANOMALY_STATE_REJECTED, fExternalAnomaly.getAnomaly().getState());
+ r4eAssert.assertFalse(fProxy.getCommandProxy().verifyAnnotation(fExternalAnomaly, false,
R4EUIConstants.ANOMALY_OPEN_ANNOTATION_ID));
- Assert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fExternalAnomaly, false,
+ r4eAssert.assertTrue(fProxy.getCommandProxy().verifyAnnotation(fExternalAnomaly, false,
R4EUIConstants.ANOMALY_CLOSED_ANNOTATION_ID));
}
+ // ------------------------------------------------------------------------
+ // Progress Review Tests
+ // ------------------------------------------------------------------------
+
/**
* Method progressReview
*/
private void progressReview() {
- Assert.assertEquals(TestConstants.REVIEW_EXIT_DECISION_ACCEPTED, fReview.getReview().getDecision().getValue()); //Test the default exit decision
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("progressReview");
+
+ r4eAssert.setTest("Progress Review");
+ r4eAssert.assertEquals(TestConstants.REVIEW_EXIT_DECISION_ACCEPTED, fReview.getReview()
+ .getDecision()
+ .getValue()); //Test the default exit decision
fProxy.getReviewProxy().progressReview(fReview);
- Assert.assertEquals(R4EReviewPhase.R4E_REVIEW_PHASE_COMPLETED,
- ((R4EReviewState) fReview.getReview().getState()).getState());
- Assert.assertNotNull(fReview.getReview().getEndDate());
+ r4eAssert.assertEquals(R4EReviewPhase.R4E_REVIEW_PHASE_COMPLETED, ((R4EReviewState) fReview.getReview()
+ .getState()).getState());
+ r4eAssert.assertNotNull(fReview.getReview().getEndDate());
}
+ // ------------------------------------------------------------------------
+ // Sorters Tests
+ // ------------------------------------------------------------------------
+
/**
* Method verifySorters
*/
- public void verifySorters() {
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ private void verifySorters() {
+
+ // Assert object
+ R4EAssert r4eAssert = new R4EAssert("verifySorters");
+
+ r4eAssert.setTest("Initial State");
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
- //Alpha sorter On/Off
+ // Alpha sorter On/Off
+ r4eAssert.setTest("Alpha Sorter On/Off");
fProxy.getCommandProxy().toggleAlphaSorter();
ViewerComparator activeSorter = fProxy.getCommandProxy().getActiveSorter();
- Assert.assertTrue(null != activeSorter && activeSorter instanceof NavigatorElementComparator
+ r4eAssert.assertTrue(null != activeSorter && activeSorter instanceof NavigatorElementComparator
&& !(activeSorter instanceof ReviewTypeComparator));
- Assert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
fProxy.getCommandProxy().toggleAlphaSorter();
- Assert.assertTrue(null == fProxy.getCommandProxy().getActiveSorter());
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(null == fProxy.getCommandProxy().getActiveSorter());
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
- //Review Type sorter On/Off
+ // Review Type sorter On/Off
+ r4eAssert.setTest("Review Type Sorter On/Off");
fProxy.getCommandProxy().toggleReviewTypeSorter();
activeSorter = fProxy.getCommandProxy().getActiveSorter();
- Assert.assertTrue(null != activeSorter && activeSorter instanceof ReviewTypeComparator);
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(null != activeSorter && activeSorter instanceof ReviewTypeComparator);
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
fProxy.getCommandProxy().toggleReviewTypeSorter();
- Assert.assertTrue(null == fProxy.getCommandProxy().getActiveSorter());
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(null == fProxy.getCommandProxy().getActiveSorter());
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
- //AlphaSorter -> ReviewTypeSorter
+ // AlphaSorter -> ReviewTypeSorter
+ r4eAssert.setTest("AlphaSorter -> ReviewTypeSorter");
fProxy.getCommandProxy().toggleAlphaSorter();
activeSorter = fProxy.getCommandProxy().getActiveSorter();
- Assert.assertTrue(null != activeSorter && activeSorter instanceof NavigatorElementComparator
+ r4eAssert.assertTrue(null != activeSorter && activeSorter instanceof NavigatorElementComparator
&& !(activeSorter instanceof ReviewTypeComparator));
- Assert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
fProxy.getCommandProxy().toggleReviewTypeSorter();
activeSorter = fProxy.getCommandProxy().getActiveSorter();
- Assert.assertTrue(null != activeSorter && activeSorter instanceof ReviewTypeComparator);
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(null != activeSorter && activeSorter instanceof ReviewTypeComparator);
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
- //ReviewTypeSorter -> AlphaSorter
+ // ReviewTypeSorter -> AlphaSorter
+ r4eAssert.setTest("ReviewTypeSorter -> AlphaSorter");
fProxy.getCommandProxy().toggleAlphaSorter();
activeSorter = fProxy.getCommandProxy().getActiveSorter();
- Assert.assertTrue(null != activeSorter && activeSorter instanceof NavigatorElementComparator
+ r4eAssert.assertTrue(null != activeSorter && activeSorter instanceof NavigatorElementComparator
&& !(activeSorter instanceof ReviewTypeComparator));
- Assert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
- //Remove AlphaSorter
+ // Remove AlphaSorter
+ r4eAssert.setTest("Remove AlphaSorter");
fProxy.getCommandProxy().toggleAlphaSorter();
- Assert.assertTrue(null == fProxy.getCommandProxy().getActiveSorter());
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
- Assert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
+ r4eAssert.assertTrue(null == fProxy.getCommandProxy().getActiveSorter());
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.ALPHA_SORTER_COMMAND));
+ r4eAssert.assertFalse(fProxy.getCommandProxy().getCommandState(R4EUIConstants.REVIEW_TYPE_SORTER_COMMAND));
}
}

Back to the top