Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-09-28 14:49:18 -0400
committerRyan D. Brooks2015-09-28 14:49:18 -0400
commit071fcbc5cca4e22e650bb459701f5fc9be701013 (patch)
treeac629d866ecfea675bc4e134c68315440282d560 /plugins/org.eclipse.osee.ats.core.test
parentb4f6f62b0d3af365b67a3786dbb24c97fa638536 (diff)
downloadorg.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.gz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.xz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.zip
refactor: Use type inference when invoking a generic constructor
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core.test')
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java22
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java30
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java2
20 files changed, 59 insertions, 59 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java
index d2f1deff0e..c2eb0e39df 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java
@@ -76,7 +76,7 @@ public class ActivityIdColumnTest {
public void testGetWorkPackages_teamWf1() throws OseeCoreException {
ActivityIdUtility col = new ActivityIdUtility(earnedValueServiceProvider);
- Set<IAtsWorkPackage> workPackages = new HashSet<IAtsWorkPackage>();
+ Set<IAtsWorkPackage> workPackages = new HashSet<>();
col.getWorkPackages(teamWf1, workPackages);
Assert.assertEquals(1, workPackages.size());
@@ -87,7 +87,7 @@ public class ActivityIdColumnTest {
public void testGetWorkPackages_task() throws OseeCoreException {
ActivityIdUtility col = new ActivityIdUtility(earnedValueServiceProvider);
- Set<IAtsWorkPackage> workPackages = new HashSet<IAtsWorkPackage>();
+ Set<IAtsWorkPackage> workPackages = new HashSet<>();
col.getWorkPackages(task1, workPackages);
// Each work flow stores it's own work package, so none should be returned
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java
index fc96fa4485..6e5c59212e 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java
@@ -58,7 +58,7 @@ public class AssigneeColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetAssigneeStrFromInWorkWorkflow() throws OseeCoreException {
- List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> assigneesToReturn = new ArrayList<>();
assigneesToReturn.addAll(Arrays.asList(joe, steve, alice));
when(stateMgr.getStateType()).thenReturn(StateType.Working);
when(workItem.getAssignees()).thenReturn(assigneesToReturn);
@@ -68,12 +68,12 @@ public class AssigneeColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetAssigneeStrFromCompletedWorkflow() throws OseeCoreException {
- List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> assigneesToReturn = new ArrayList<>();
when(stateMgr.getStateType()).thenReturn(StateType.Working);
when(workItem.getAssignees()).thenReturn(assigneesToReturn);
Assert.assertEquals("", AssigneeColumn.instance.getAssigneeStr(workItem));
- List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementersToReturn = new ArrayList<>();
when(workItem.getImplementers()).thenReturn(implementersToReturn);
when(stateMgr.getStateType()).thenReturn(StateType.Completed);
when(workItem.getCompletedBy()).thenReturn(steve);
@@ -83,7 +83,7 @@ public class AssigneeColumnTest extends AbstractUserTest {
// add alice as completedFromState assignee
implementersToReturn.add(steve);
when(workItem.getCompletedFromState()).thenReturn("Implement");
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers);
Assert.assertTrue(AssigneeColumn.instance.getAssigneeStr(workItem).contains("alice"));
@@ -97,12 +97,12 @@ public class AssigneeColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetAssigneeStrFromCancelledWorkflow() throws OseeCoreException {
- List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> assigneesToReturn = new ArrayList<>();
when(stateMgr.getStateType()).thenReturn(StateType.Working);
when(workItem.getAssignees()).thenReturn(assigneesToReturn);
Assert.assertEquals("", AssigneeColumn.instance.getAssigneeStr(workItem));
- List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementersToReturn = new ArrayList<>();
when(workItem.getImplementers()).thenReturn(implementersToReturn);
when(stateMgr.getStateType()).thenReturn(StateType.Cancelled);
when(workItem.getCancelledBy()).thenReturn(steve);
@@ -111,7 +111,7 @@ public class AssigneeColumnTest extends AbstractUserTest {
// add alice as completedFromState assignee
implementersToReturn.add(steve);
when(workItem.getCancelledFromState()).thenReturn("Implement");
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers);
Assert.assertTrue(AssigneeColumn.instance.getAssigneeStr(workItem).contains("alice"));
@@ -126,13 +126,13 @@ public class AssigneeColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetAssigneesStr_hasActions_oneWorkingOneCancelled() throws OseeCoreException {
- List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> assigneesToReturn = new ArrayList<>();
when(stateMgr.getStateType()).thenReturn(StateType.Working);
when(workItem.getAssignees()).thenReturn(assigneesToReturn);
when(stateMgr2.getStateType()).thenReturn(StateType.Cancelled);
when(workItem2.getCancelledFromState()).thenReturn("Implement");
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(joe);
when(workItem2.getImplementers()).thenReturn(implementStateImplementers);
@@ -171,12 +171,12 @@ public class AssigneeColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetAssigneesStr_hasActions_twoWorkingDuplicates() throws OseeCoreException {
- List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> assigneesToReturn = new ArrayList<>();
assigneesToReturn.add(steve);
when(workItem.getAssignees()).thenReturn(assigneesToReturn);
when(stateMgr.getStateType()).thenReturn(StateType.Working);
- List<IAtsUser> assigneesToReturn2 = new ArrayList<IAtsUser>();
+ List<IAtsUser> assigneesToReturn2 = new ArrayList<>();
assigneesToReturn2.add(steve);
when(workItem2.getAssignees()).thenReturn(assigneesToReturn2);
when(stateMgr2.getStateType()).thenReturn(StateType.Working);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java
index 337d759106..b3c9a2e83e 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java
@@ -75,7 +75,7 @@ public class ImplementersColumnTest extends AbstractUserTest {
*/
@org.junit.Test
public void testGetImplementersStrFromInWorkWorkflow_blankIfAssigned() throws OseeCoreException {
- List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> assigneesToReturn = new ArrayList<>();
assigneesToReturn.addAll(Arrays.asList(steve, alice));
when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Working);
when(workItem.getAssignees()).thenReturn(assigneesToReturn);
@@ -114,7 +114,7 @@ public class ImplementersColumnTest extends AbstractUserTest {
*/
@org.junit.Test
public void testGetImplementersStrFromCompletedCancelledWorkflow_completedByAndAssignee() throws OseeCoreException {
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Completed);
@@ -137,9 +137,9 @@ public class ImplementersColumnTest extends AbstractUserTest {
*/
@org.junit.Test
public void testGetImplementersStrFromCompletedCancelledWorkflow_completedByAndAssigneeWithUnassigned() throws OseeCoreException {
- List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementersToReturn = new ArrayList<>();
implementersToReturn.add(alice);
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(AtsCoreUsers.UNASSIGNED_USER);
when(workItem.getImplementers()).thenReturn(implementersToReturn);
@@ -164,7 +164,7 @@ public class ImplementersColumnTest extends AbstractUserTest {
*/
@org.junit.Test
public void testGetImplementersStrFromCompletedCancelledWorkflow_duplicatesHandled() throws OseeCoreException {
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
implementStateImplementers.add(steve);
@@ -189,26 +189,26 @@ public class ImplementersColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetImplementersStrFromCompletedCancelledWorkflow_fromAll() throws OseeCoreException {
- List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementersToReturn = new ArrayList<>();
when(workItem.getImplementers()).thenReturn(implementersToReturn);
when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Completed);
when(workItem.getCompletedBy()).thenReturn(steve);
implementersToReturn.add(joe);
when(workItem.getCompletedFromState()).thenReturn("Implement");
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers);
Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("alice"));
Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("joe"));
Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("steve"));
- implementersToReturn = new ArrayList<IAtsUser>();
+ implementersToReturn = new ArrayList<>();
when(workItem.getImplementers()).thenReturn(implementersToReturn);
when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Cancelled);
when(workItem.getCancelledBy()).thenReturn(steve);
implementersToReturn.add(joe);
when(workItem.getCancelledFromState()).thenReturn("Implement");
- implementStateImplementers = new ArrayList<IAtsUser>();
+ implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers);
Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("alice"));
@@ -219,9 +219,9 @@ public class ImplementersColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetImplementersStrFromCompletedWorkflow_duplicates() throws OseeCoreException {
- List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementersToReturn = new ArrayList<>();
implementersToReturn.add(alice);
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
when(workItem.getImplementers()).thenReturn(implementersToReturn);
@@ -241,14 +241,14 @@ public class ImplementersColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetImplementers_fromCompletedCancelledBy_noDuplicatesIfInImplementersAndCompletedBy() throws OseeCoreException {
- List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementStateImplementers = new ArrayList<>();
implementStateImplementers.add(alice);
when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Completed);
when(workItem.getCompletedFromState()).thenReturn("Implement");
when(workItem.getCompletedBy()).thenReturn(alice);
when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers);
- List<IAtsUser> implementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementers = new ArrayList<>();
ImplementersColumn.instance.getImplementers_fromCompletedCancelledBy(workItem, implementers);
Assert.assertEquals(implementers.iterator().next(), alice);
@@ -257,7 +257,7 @@ public class ImplementersColumnTest extends AbstractUserTest {
when(workItem.getCancelledBy()).thenReturn(alice);
when(workItem.getCancelledFromState()).thenReturn("Implement");
when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers);
- implementers = new ArrayList<IAtsUser>();
+ implementers = new ArrayList<>();
ImplementersColumn.instance.getImplementers_fromCompletedCancelledBy(workItem, implementers);
Assert.assertEquals(implementers.iterator().next(), alice);
}
@@ -265,7 +265,7 @@ public class ImplementersColumnTest extends AbstractUserTest {
@org.junit.Test
public void testGetImplementers_fromWorkItem_noDuplicates() throws OseeCoreException {
MockWorkItem workItem = new MockWorkItem("this", "Completed", StateType.Completed);
- List<IAtsUser> implementers = new ArrayList<IAtsUser>();
+ List<IAtsUser> implementers = new ArrayList<>();
implementers.add(alice);
workItem.addImplementer(alice);
ImplementersColumn.instance.getImplementers_fromWorkItem(workItem, implementers);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java
index eebed12a59..32332beb1e 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java
@@ -49,7 +49,7 @@ public class AtsLogFactoryTest {
public void setup() throws OseeCoreException {
MockitoAnnotations.initMocks(this);
- List<IAtsLogItem> items = new ArrayList<IAtsLogItem>();
+ List<IAtsLogItem> items = new ArrayList<>();
when(workItem.getLog()).thenReturn(log);
when(log.getLogItems()).thenReturn(items);
}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java
index 237e38c395..9dcf8f1cf1 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java
@@ -150,7 +150,7 @@ public class StateManagerStoreTest {
Assert.assertEquals(2, stateMgr.getAssignees().size());
when(workItem.getStateMgr()).thenReturn(stateMgr);
- List<Object> objects = new ArrayList<Object>();
+ List<Object> objects = new ArrayList<>();
when(changes.getObjects()).thenReturn(objects);
IExecuteListener listener =
StateManagerStore.getPostPersistExecutionListener(asUser, workItem, stateMgr, stateMgr.getAssigneesAdded(),
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java
index 3b27789acd..e51a334e43 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java
@@ -93,7 +93,7 @@ public class StateManagerTest extends AbstractUserTest {
stateMgr.addAssignees("endorse", null);
Assert.assertTrue(stateMgr.getAssignees().isEmpty());
- List<IAtsUser> users = new ArrayList<IAtsUser>();
+ List<IAtsUser> users = new ArrayList<>();
stateMgr.addAssignees("endorse", users);
Assert.assertTrue(stateMgr.getAssignees().isEmpty());
@@ -125,7 +125,7 @@ public class StateManagerTest extends AbstractUserTest {
stateMgr.setAssignee(null);
Assert.assertTrue(stateMgr.getAssignees().isEmpty());
- List<IAtsUser> users = new ArrayList<IAtsUser>();
+ List<IAtsUser> users = new ArrayList<>();
stateMgr.setAssignees("endorse", users);
Assert.assertTrue(stateMgr.getAssignees().isEmpty());
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java
index 5f20d44417..018c5f6d3a 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java
@@ -20,7 +20,7 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
public class MockState {
private final String name;
- private final List<IAtsUser> assignees = new LinkedList<IAtsUser>();
+ private final List<IAtsUser> assignees = new LinkedList<>();
private double hoursSpent = 0;
private int percentComplete = 0;
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java
index bcb5530068..43144f0e84 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java
@@ -26,7 +26,7 @@ public class AtsUsersUtilityTest extends AbstractUserTest {
@Test
public void testGetValidEmailUsers() throws OseeCoreException {
- Set<IAtsUser> users = new HashSet<IAtsUser>();
+ Set<IAtsUser> users = new HashSet<>();
users.add(joe);
users.add(steve);
users.add(alice);
@@ -42,7 +42,7 @@ public class AtsUsersUtilityTest extends AbstractUserTest {
@Test
public void testGetActiveEmailUsers() throws OseeCoreException {
- Set<IAtsUser> users = new HashSet<IAtsUser>();
+ Set<IAtsUser> users = new HashSet<>();
users.add(joe);
users.add(steve);
users.add(alice);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java
index 359c0ec33e..b70abeff77 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java
@@ -127,7 +127,7 @@ public class CoreAtsUsersTest {
IAtsUser mapToE = user1;
IAtsUser alsoMapToE = user1;
- HashMap<IAtsUser, Double> hash = new HashMap<IAtsUser, Double>();
+ HashMap<IAtsUser, Double> hash = new HashMap<>();
hash.put(mapToPi, Math.PI);
hash.put(mapToE, Math.E);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java
index c39bf11c6a..792a40277b 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java
@@ -31,7 +31,7 @@ public class AtsObjectsTest {
@Test
public void testToUuids() {
- List<IAtsObject> objs = new ArrayList<IAtsObject>();
+ List<IAtsObject> objs = new ArrayList<>();
objs.add(AtsCoreUsers.SYSTEM_USER);
objs.add(AtsCoreUsers.GUEST_USER);
Assert.assertEquals(Arrays.asList(AtsCoreUsers.SYSTEM_USER.getUuid(), AtsCoreUsers.GUEST_USER.getUuid()),
@@ -42,7 +42,7 @@ public class AtsObjectsTest {
public void testToString() {
Assert.assertEquals("", AtsObjects.toString("; ", Collections.emptyList()));
- List<Object> objs = new ArrayList<Object>();
+ List<Object> objs = new ArrayList<>();
objs.add(AtsCoreUsers.SYSTEM_USER);
objs.add(AtsCoreUsers.GUEST_USER);
objs.add(AtsCoreUsers.UNASSIGNED_USER);
@@ -54,7 +54,7 @@ public class AtsObjectsTest {
@Test
public void testGetNames() {
- List<IAtsObject> objs = new ArrayList<IAtsObject>();
+ List<IAtsObject> objs = new ArrayList<>();
objs.add(AtsCoreUsers.SYSTEM_USER);
objs.add(AtsCoreUsers.GUEST_USER);
objs.add(AtsCoreUsers.UNASSIGNED_USER);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java
index d2a993bc01..fe5d9e35cb 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java
@@ -32,7 +32,7 @@ public class AtsXWidgetValidateManagerTest {
@Test
public void testValidateTransition_emptyValidators() {
- List<WidgetResult> results = new LinkedList<WidgetResult>();
+ List<WidgetResult> results = new LinkedList<>();
AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager();
manager.validateTransition(results, ValidatorTestUtil.emptyValueProvider, null, null, null, atsServices);
@@ -41,7 +41,7 @@ public class AtsXWidgetValidateManagerTest {
@Test
public void testValidateTransition_validValidators() {
- List<WidgetResult> results = new LinkedList<WidgetResult>();
+ List<WidgetResult> results = new LinkedList<>();
AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager();
manager.add(new TestValidatorProvider(new AtsValidator()));
@@ -51,7 +51,7 @@ public class AtsXWidgetValidateManagerTest {
@Test
public void testValidateTransition_inValidValidators() {
- List<WidgetResult> results = new LinkedList<WidgetResult>();
+ List<WidgetResult> results = new LinkedList<>();
AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager();
manager.add(new TestValidatorProvider(new AtsErrorValidator()));
@@ -61,7 +61,7 @@ public class AtsXWidgetValidateManagerTest {
@Test
public void testValidateTransition_exceptoinValidators() {
- List<WidgetResult> results = new LinkedList<WidgetResult>();
+ List<WidgetResult> results = new LinkedList<>();
AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager();
manager.add(new TestValidatorProvider(new AtsExceptoinValidator()));
@@ -111,7 +111,7 @@ public class AtsXWidgetValidateManagerTest {
private final LinkedList<IAtsXWidgetValidator> validators;
public TestValidatorProvider(IAtsXWidgetValidator validator) {
- validators = new LinkedList<IAtsXWidgetValidator>();
+ validators = new LinkedList<>();
validators.add(validator);
}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java
index be3376b697..f013e82dcf 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java
@@ -18,7 +18,7 @@ import java.util.List;
*/
public class MockRuleManager {
- public List<String> rules = new ArrayList<String>();
+ public List<String> rules = new ArrayList<>();
public List<String> getRules() {
return rules;
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java
index 06d8c19430..e59d399d84 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java
@@ -27,13 +27,13 @@ public class MockStateDefinition implements IAtsStateDefinition {
private StateType StateType;
private int ordinal = 0;
- private final List<IAtsLayoutItem> stateItems = new ArrayList<IAtsLayoutItem>(5);
+ private final List<IAtsLayoutItem> stateItems = new ArrayList<>(5);
private final MockRuleManager ruleMgr = new MockRuleManager();
- private final List<IAtsStateDefinition> toStates = new ArrayList<IAtsStateDefinition>(5);
+ private final List<IAtsStateDefinition> toStates = new ArrayList<>(5);
private IAtsStateDefinition defaultToState;
- private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<IAtsStateDefinition>(5);
- private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<IAtsDecisionReviewDefinition>();
- private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<IAtsPeerReviewDefinition>();
+ private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<>(5);
+ private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<>();
+ private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<>();
private IAtsWorkDefinition workDefinition;
private int stateWeight = 0;
private Integer recommendedPercentComplete = null;
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java
index 2e3022fa5e..b7f21a1d54 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java
@@ -30,7 +30,7 @@ public class MockWidgetDefinition implements IAtsWidgetDefinition {
private String xWidgetName;
private String defaultValue;
private final WidgetOptionHandler options = new WidgetOptionHandler();
- private final List<IAtsWidgetConstraint> constraints = new ArrayList<IAtsWidgetConstraint>();
+ private final List<IAtsWidgetConstraint> constraints = new ArrayList<>();
private String name;
public MockWidgetDefinition(String name) {
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java
index 2a0b634383..38b2b82dde 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java
@@ -130,7 +130,7 @@ public class AtsWorkDefinitionAdminImplTest {
*/
@Test
public void testGetWorkDefinitionForPeerToPeerReviewIAtsTeamWorkflowIAtsPeerToPeerReview__fromReview() throws Exception {
- List<Object> attrValues = new ArrayList<Object>();
+ List<Object> attrValues = new ArrayList<>();
attrValues.add(MyPeerToPeerWorkDefId);
when(attributeResolver.getAttributeValues(peerReview, AtsAttributeTypes.WorkflowDefinition)).thenReturn(
attrValues);
@@ -146,7 +146,7 @@ public class AtsWorkDefinitionAdminImplTest {
@Test
public void testGetWorkDefinitionForPeerToPeerReviewNotYetCreatedAndStandalone() throws Exception {
when(teamWf.getTeamDefinition()).thenReturn(featureTeamDef);
- List<Object> attrValues = new ArrayList<Object>();
+ List<Object> attrValues = new ArrayList<>();
attrValues.add(MyPeerToPeerWorkDefId);
when(
attributeResolver.getAttributeValues(topTeamDef, AtsAttributeTypes.RelatedPeerWorkflowDefinition)).thenReturn(
@@ -186,7 +186,7 @@ public class AtsWorkDefinitionAdminImplTest {
workDefAmin.getPeerToPeerWorkDefinitionFromTeamDefinitionAttributeValueRecurse(featureTeamDef).isMatched());
// Setup that top team definition has WorkDefinition defined
- List<Object> attrValues = new ArrayList<Object>();
+ List<Object> attrValues = new ArrayList<>();
attrValues.add(MyPeerToPeerWorkDefId);
when(
attributeResolver.getAttributeValues(topTeamDef, AtsAttributeTypes.RelatedPeerWorkflowDefinition)).thenReturn(
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java
index 49ccd45362..32543d8c1a 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java
@@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.type.Identity;
*/
public class MockWorkDefinition implements IAtsWorkDefinition {
- private final List<IAtsStateDefinition> states = new ArrayList<IAtsStateDefinition>(5);
+ private final List<IAtsStateDefinition> states = new ArrayList<>(5);
private String id;
private IAtsStateDefinition startState;
private String name;
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java
index ec800ca87f..8008d986cb 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java
@@ -39,7 +39,7 @@ public class WorkflowManagerCoreTest {
@Mock private IAtsTask task;
@Mock private IAtsUser Joe, Mary;
// @formatter:on
- List<IAtsUser> assignees = new ArrayList<IAtsUser>();
+ List<IAtsUser> assignees = new ArrayList<>();
@Before
public void setup() {
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java
index 2fb11740b8..7dc4a34bbb 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java
@@ -117,7 +117,7 @@ public class StateManagerUtilityTest {
// test no visited states
when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentState, null)).thenReturn("Analyze;;;");
- List<String> emptyVisitedNames = new ArrayList<String>();
+ List<String> emptyVisitedNames = new ArrayList<>();
when(stateMgr.getVisitedStateNames()).thenReturn(emptyVisitedNames);
result = StateManagerUtility.isDirtyResult(workItem, stateMgr, attrResolver, workStateFactory);
Assert.assertFalse(result.isTrue());
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java
index 0495acdf64..685bc9d026 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java
@@ -80,7 +80,7 @@ public class TransitionHelperAdapterTest {
@Test
public void testIsSystemUserAssignee() {
when(workItem.getStateMgr()).thenReturn(stateMgr);
- List<IAtsUser> assignees = new ArrayList<IAtsUser>();
+ List<IAtsUser> assignees = new ArrayList<>();
when(stateMgr.getAssignees()).thenReturn(assignees);
Assert.assertFalse(helper.isSystemUserAssingee(workItem));
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java
index 04811221a0..989fb4f8d9 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java
@@ -42,7 +42,7 @@ public class TransitionStatusDataTest {
public void setup() throws OseeCoreException {
MockitoAnnotations.initMocks(this);
- List<IAtsWorkItem> workItems = new ArrayList<IAtsWorkItem>();
+ List<IAtsWorkItem> workItems = new ArrayList<>();
workItems.add(workItem);
workItems.add(workItem2);
data = new TransitionStatusData(workItems, false);

Back to the top