Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2013-04-10 01:29:35 +0000
committerdonald.g.dunne2013-04-12 22:07:11 +0000
commitc14de5ae559f65a71b6f6389e8ee5fce91136699 (patch)
tree7b9cdbb2963f68675aad4811eae1b89d4ce528ff /plugins/org.eclipse.osee.ats.client.integration.tests
parent27ce368f4e9347e6c5d385045d2bd658ce8c9a3e (diff)
downloadorg.eclipse.osee-c14de5ae559f65a71b6f6389e8ee5fce91136699.tar.gz
org.eclipse.osee-c14de5ae559f65a71b6f6389e8ee5fce91136699.tar.xz
org.eclipse.osee-c14de5ae559f65a71b6f6389e8ee5fce91136699.zip
bug[ats_SM0J7]: Fix AtsUsers management
Refactored code so we can better control ats user management class initialization. Updated code to use IAtsClient api and request IAtsUserAdmin instead of using static utility classes. Removed user caching from ats. Change-Id: I3f0aa04c8ea253fc96684dca305bba76636cd0d7
Diffstat (limited to 'plugins/org.eclipse.osee.ats.client.integration.tests')
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/FavoriteActionTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ResourceHistoryActionTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/SubscribedActionTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/artifact/log/LogItemTest.java16
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/EstimatedHoursColumnTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java26
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java21
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java59
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotifyUsersTest.java31
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewDefinitionManagerTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java18
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerReviewDefinitionManagerTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerToPeerReviewManagerTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java22
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsCoreClient_Util_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java36
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUsersTest.java78
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/note/NoteItemTest.java22
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java60
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewDecisionStateItemTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewPrepareStateItemTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java12
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java13
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java30
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewNavigateItemsToWorldViewTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java10
34 files changed, 335 insertions, 239 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/FavoriteActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/FavoriteActionTest.java
index bb46546745..9ae3e6509b 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/FavoriteActionTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/FavoriteActionTest.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.ats.client.integration.tests.ats.actions;
import junit.framework.Assert;
import org.eclipse.osee.ats.actions.FavoriteAction;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.support.test.util.TestUtil;
import org.junit.Test;
@@ -28,12 +28,12 @@ public class FavoriteActionTest extends AbstractAtsActionTest {
public void test() throws Exception {
SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
- Assert.assertFalse(AtsUsersClient.getOseeUser().getRelatedArtifacts(AtsRelationTypes.FavoriteUser_Artifact).contains(
- AtsTestUtil.getTeamWf()));
+ Assert.assertFalse(AtsClientService.get().getUserAdmin().getCurrentOseeUser().getRelatedArtifacts(
+ AtsRelationTypes.FavoriteUser_Artifact).contains(AtsTestUtil.getTeamWf()));
FavoriteAction action = createAction();
action.runWithException();
- Assert.assertTrue(AtsUsersClient.getOseeUser().getRelatedArtifacts(AtsRelationTypes.FavoriteUser_Artifact).contains(
- AtsTestUtil.getTeamWf()));
+ Assert.assertTrue(AtsClientService.get().getUserAdmin().getCurrentOseeUser().getRelatedArtifacts(
+ AtsRelationTypes.FavoriteUser_Artifact).contains(AtsTestUtil.getTeamWf()));
TestUtil.severeLoggingEnd(monitor);
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ResourceHistoryActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ResourceHistoryActionTest.java
index 9eab3a19d8..17f97e9d9e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ResourceHistoryActionTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ResourceHistoryActionTest.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.ats.client.integration.tests.ats.actions;
import junit.framework.Assert;
import org.eclipse.osee.ats.actions.ResourceHistoryAction;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.support.test.util.TestUtil;
@@ -29,8 +29,8 @@ public class ResourceHistoryActionTest extends AbstractAtsActionTest {
public void test() throws Exception {
SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
- Assert.assertFalse(AtsUsersClient.getOseeUser().getRelatedArtifacts(AtsRelationTypes.FavoriteUser_Artifact).contains(
- AtsTestUtil.getTeamWf()));
+ Assert.assertFalse(AtsClientService.get().getUserAdmin().getCurrentOseeUser().getRelatedArtifacts(
+ AtsRelationTypes.FavoriteUser_Artifact).contains(AtsTestUtil.getTeamWf()));
ResourceHistoryAction action = createAction();
action.runWithException();
TestUtil.severeLoggingEnd(monitor);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/SubscribedActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/SubscribedActionTest.java
index dfdb737fd9..db6f97b433 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/SubscribedActionTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/SubscribedActionTest.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.ats.client.integration.tests.ats.actions;
import junit.framework.Assert;
import org.eclipse.osee.ats.actions.SubscribedAction;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.support.test.util.TestUtil;
import org.junit.Test;
@@ -28,12 +28,12 @@ public class SubscribedActionTest extends AbstractAtsActionTest {
public void test() throws Exception {
SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
AtsTestUtil.cleanupAndReset(getClass().getSimpleName());
- Assert.assertFalse(AtsUsersClient.getOseeUser().getRelatedArtifacts(AtsRelationTypes.SubscribedUser_Artifact).contains(
- AtsTestUtil.getTeamWf()));
+ Assert.assertFalse(AtsClientService.get().getUserAdmin().getCurrentOseeUser().getRelatedArtifacts(
+ AtsRelationTypes.SubscribedUser_Artifact).contains(AtsTestUtil.getTeamWf()));
SubscribedAction action = createAction();
action.runWithException();
- Assert.assertTrue(AtsUsersClient.getOseeUser().getRelatedArtifacts(AtsRelationTypes.SubscribedUser_Artifact).contains(
- AtsTestUtil.getTeamWf()));
+ Assert.assertTrue(AtsClientService.get().getUserAdmin().getCurrentOseeUser().getRelatedArtifacts(
+ AtsRelationTypes.SubscribedUser_Artifact).contains(AtsTestUtil.getTeamWf()));
TestUtil.severeLoggingEnd(monitor);
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/artifact/log/LogItemTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/artifact/log/LogItemTest.java
index f4ab0799ac..ba5bc08b16 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/artifact/log/LogItemTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/artifact/log/LogItemTest.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.ats.client.integration.tests.ats.artifact.log;
import java.util.Date;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.workflow.log.LogItem;
import org.eclipse.osee.ats.core.client.workflow.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -36,8 +36,8 @@ public class LogItemTest {
public static void validateItem(LogItem item, Date date) throws OseeCoreException {
Assert.assertEquals(LogType.Error, item.getType());
Assert.assertEquals(date, item.getDate());
- Assert.assertEquals(AtsUsersClient.getUser(), item.getUser());
- Assert.assertEquals(AtsUsersClient.getUser().getUserId(), item.getUserId());
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getCurrentUser(), item.getUser());
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getCurrentUser().getUserId(), item.getUserId());
Assert.assertEquals("Analyze", item.getState());
Assert.assertEquals("my msg", item.getMsg());
}
@@ -46,7 +46,7 @@ public class LogItemTest {
public void testLogItemLogTypeStringStringStringStringString() throws OseeCoreException {
Date date = new Date();
LogItem item =
- new LogItem(LogType.Error, String.valueOf(date.getTime()), AtsUsersClient.getUser().getUserId(), "Analyze",
+ new LogItem(LogType.Error, String.valueOf(date.getTime()), AtsClientService.get().getUserAdmin().getCurrentUser().getUserId(), "Analyze",
"my msg", "ASDF4");
validateItem(item, date);
@@ -56,14 +56,14 @@ public class LogItemTest {
public void testLogItemStringStringStringStringStringString() throws OseeCoreException {
Date date = new Date();
LogItem item =
- new LogItem(LogType.Error.name(), String.valueOf(date.getTime()), AtsUsersClient.getUser().getUserId(),
+ new LogItem(LogType.Error.name(), String.valueOf(date.getTime()), AtsClientService.get().getUserAdmin().getCurrentUser().getUserId(),
"Analyze", "my msg", "ASDF4");
validateItem(item, date);
}
public static LogItem getTestLogItem(Date date) throws OseeCoreException {
- return new LogItem(LogType.Error, date, AtsUsersClient.getUser(), "Analyze", "my msg", "ASDF4");
+ return new LogItem(LogType.Error, date, AtsClientService.get().getUserAdmin().getCurrentUser(), "Analyze", "my msg", "ASDF4");
}
@Test
@@ -72,7 +72,7 @@ public class LogItemTest {
LogItem item = getTestLogItem(date);
Assert.assertEquals(
- "my msg (Error)from Analyze by " + AtsUsersClient.getUser().getName() + " on " + DateUtil.getMMDDYYHHMM(date),
+ "my msg (Error)from Analyze by " + AtsClientService.get().getUserAdmin().getCurrentUser().getName() + " on " + DateUtil.getMMDDYYHHMM(date),
item.toString());
}
@@ -81,7 +81,7 @@ public class LogItemTest {
Date date = new Date();
LogItem item = getTestLogItem(date);
- Assert.assertEquals("NOTE (Error): my msg (" + AtsUsersClient.getUser().getName() + ")",
+ Assert.assertEquals("NOTE (Error): my msg (" + AtsClientService.get().getUserAdmin().getCurrentUser().getName() + ")",
item.toHTML(AHTML.LABEL_FONT));
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java
index adfb3eec38..4ae6be7500 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java
@@ -13,12 +13,12 @@ package org.eclipse.osee.ats.client.integration.tests.ats.column;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.column.CancelledDateColumn;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionHelper;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionManager;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionOption;
@@ -77,7 +77,7 @@ public class CancelledDateColumnTest {
helper =
new TransitionHelper("Transition to Endorse", Arrays.asList(teamArt), TeamState.Endorse.getName(),
- Collections.singleton(AtsUsersClient.getUser()), null, TransitionOption.OverrideTransitionValidityCheck,
+ Collections.singleton(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.OverrideTransitionValidityCheck,
TransitionOption.OverrideAssigneeCheck);
transitionMgr = new TransitionManager(helper);
results = transitionMgr.handleAll();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java
index 76118a1990..667e663a8d 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java
@@ -12,12 +12,12 @@ package org.eclipse.osee.ats.client.integration.tests.ats.column;
import java.util.Arrays;
import java.util.Date;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.column.CompletedDateColumn;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionHelper;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionManager;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionOption;
@@ -76,7 +76,7 @@ public class CompletedDateColumnTest {
helper =
new TransitionHelper("Transition to Endorse", Arrays.asList(teamArt), TeamState.Endorse.getName(),
- Arrays.asList(AtsUsersClient.getUser()), null, TransitionOption.OverrideTransitionValidityCheck,
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.OverrideTransitionValidityCheck,
TransitionOption.OverrideAssigneeCheck);
transitionMgr = new TransitionManager(helper);
results = transitionMgr.handleAll();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/EstimatedHoursColumnTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/EstimatedHoursColumnTest.java
index 4afac0c97c..75b06b306a 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/EstimatedHoursColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/EstimatedHoursColumnTest.java
@@ -12,13 +12,13 @@ package org.eclipse.osee.ats.client.integration.tests.ats.column;
import java.util.Date;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewManager;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.workflow.EstimatedHoursUtil;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
@@ -55,10 +55,10 @@ public class EstimatedHoursColumnTest {
TeamWorkFlowArtifact teamArt2 =
DemoTestUtil.addTeamWorkflow(actionArt, EstimatedHoursColumnTest.class.getSimpleName(), transaction);
TaskArtifact taskArt1 =
- teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName(), new Date(), AtsUsersClient.getUser());
+ teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName(), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser());
taskArt1.persist(transaction);
TaskArtifact taskArt2 =
- teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName(), new Date(), AtsUsersClient.getUser());
+ teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName(), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser());
taskArt2.persist(transaction);
PeerToPeerReviewArtifact peerArt =
PeerToPeerReviewManager.createNewPeerToPeerReview(teamArt1, getClass().getSimpleName(),
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java
index d7df8490e8..25fe5d51b4 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java
@@ -14,6 +14,7 @@ import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.column.ReviewAuthorColumn;
@@ -33,7 +34,6 @@ import org.eclipse.osee.ats.core.client.review.role.Role;
import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
@@ -79,50 +79,50 @@ public class PeerToPeerReviewColumnsTest {
transaction =
TransactionManager.createTransaction(AtsUtil.getAtsBranch(), PeerToPeerReviewColumnsTest.class.getSimpleName());
ReviewDefectItem item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
"description", "resolution", "location", new Date());
ReviewDefectManager defectManager = new ReviewDefectManager(peerArt);
defectManager.addOrUpdateDefectItem(item);
item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
"description 2", "resolution", "location", new Date());
defectManager.addOrUpdateDefectItem(item);
item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
"description 3", "resolution", "location", new Date());
defectManager.addOrUpdateDefectItem(item);
item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Issue, Disposition.None, InjectionActivity.Code,
"description 34", "resolution", "location", new Date());
defectManager.addOrUpdateDefectItem(item);
item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Major, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Major, Disposition.None, InjectionActivity.Code,
"description 4", "resolution", "location", new Date());
defectManager.addOrUpdateDefectItem(item);
item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Minor, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Minor, Disposition.None, InjectionActivity.Code,
"description 5", "resolution", "location", new Date());
defectManager.addOrUpdateDefectItem(item);
item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Minor, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Minor, Disposition.None, InjectionActivity.Code,
"description 6", "resolution", "location", new Date());
defectManager.addOrUpdateDefectItem(item);
item =
- new ReviewDefectItem(AtsUsersClient.getUser(), Severity.Minor, Disposition.None, InjectionActivity.Code,
+ new ReviewDefectItem(AtsClientService.get().getUserAdmin().getCurrentUser(), Severity.Minor, Disposition.None, InjectionActivity.Code,
"description 6", "resolution", "location", new Date());
defectManager.addOrUpdateDefectItem(item);
defectManager.saveToArtifact(peerArt);
- UserRole role = new UserRole(Role.Author, AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay));
+ UserRole role = new UserRole(Role.Author, AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay));
UserRoleManager roleMgr = new UserRoleManager(peerArt);
roleMgr.addOrUpdateUserRole(role);
- role = new UserRole(Role.Moderator, AtsUsersClient.getUserFromToken(DemoUsers.Jason_Michael));
+ role = new UserRole(Role.Moderator, AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Jason_Michael));
roleMgr.addOrUpdateUserRole(role);
- role = new UserRole(Role.Reviewer, AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ role = new UserRole(Role.Reviewer, AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
roleMgr.addOrUpdateUserRole(role);
- role = new UserRole(Role.Reviewer, AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones));
+ role = new UserRole(Role.Reviewer, AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones));
roleMgr.addOrUpdateUserRole(role);
roleMgr.saveToArtifact(transaction);
peerArt.persist(transaction);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
index 4bc98e6062..b8a56d1836 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
@@ -31,7 +31,7 @@ import org.eclipse.osee.ats.core.client.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowManager;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
+
import org.eclipse.osee.ats.core.client.workflow.ChangeType;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.config.AtsVersionService;
@@ -167,7 +167,7 @@ public class AtsBranchConfigurationTest {
transaction = TransactionManager.createTransaction(AtsUtil.getAtsBranch(), "Branch Configuration Test");
Artifact actionArt =
ActionManager.createAction(null, BRANCH_VIA_VERSIONS.getName() + " Req Changes", "description",
- ChangeType.Problem, "1", false, null, selectedActionableItems, new Date(), AtsUsersClient.getUser(), null,
+ ChangeType.Problem, "1", false, null, selectedActionableItems, new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null,
transaction);
TeamWorkFlowArtifact teamWf = ActionManager.getTeams(actionArt).iterator().next();
AtsVersionService.get().setTargetedVersionAndStore(teamWf, versionToTarget);
@@ -181,7 +181,7 @@ public class AtsBranchConfigurationTest {
OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Transitioning to Implement state");
}
- dtwm.transitionTo(TeamState.Implement, AtsUsersClient.getUser(), false, transaction);
+ dtwm.transitionTo(TeamState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), false, transaction);
teamWf.persist("Branch Configuration Test");
SMAEditor.editArtifact(teamWf);
@@ -282,7 +282,7 @@ public class AtsBranchConfigurationTest {
String actionTitle = BRANCH_VIA_TEAM_DEFINITION.getName() + " Req Changes";
Artifact actionArt =
ActionManager.createAction(null, actionTitle, "description", ChangeType.Problem, "1", false, null,
- selectedActionableItems, new Date(), AtsUsersClient.getUser(), null, transaction);
+ selectedActionableItems, new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
transaction.execute();
final TeamWorkFlowArtifact teamWf = ActionManager.getTeams(actionArt).iterator().next();
@@ -292,7 +292,7 @@ public class AtsBranchConfigurationTest {
if (DEBUG) {
OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Transitioning to Implement state");
}
- dtwm.transitionTo(TeamState.Implement, AtsUsersClient.getUser(), false, transaction);
+ dtwm.transitionTo(TeamState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), false, transaction);
teamWf.persist("Test branch via team definition: Transition to desired state");
// create branch
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
index d24298782f..65d08f707e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
@@ -45,7 +45,6 @@ import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewManager;
import org.eclipse.osee.ats.core.client.review.ReviewManager;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.workflow.ChangeType;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionHelper;
@@ -323,7 +322,7 @@ public class AtsTestUtil {
teamDef = AtsClientService.get().createTeamDefinition(GUID.create(), getTitle("Team Def", postFixName));
teamDef.setWorkflowDefinition(WORK_DEF_NAME);
teamDef.setActive(true);
- teamDef.getLeads().add(AtsUsersClient.getUser());
+ teamDef.getLeads().add(AtsClientService.get().getUserAdmin().getCurrentUser());
testAi.setTeamDefinition(teamDef);
testAi2.setTeamDefinition(teamDef);
@@ -346,7 +345,7 @@ public class AtsTestUtil {
actionArt =
ActionManager.createAction(null, getTitle("Team WF", postFixName), "description", ChangeType.Improvement, "1",
- false, null, Arrays.asList(testAi), new Date(), AtsUsersClient.getUser(), null, transaction);
+ false, null, Arrays.asList(testAi), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
teamArt = actionArt.getFirstTeam();
@@ -358,7 +357,7 @@ public class AtsTestUtil {
public static TaskArtifact getOrCreateTaskOffTeamWf1() throws OseeCoreException {
ensureLoaded();
if (taskArtWf1 == null) {
- taskArtWf1 = teamArt.createNewTask(getTitle("Task", postFixName), new Date(), AtsUsersClient.getUser());
+ taskArtWf1 = teamArt.createNewTask(getTitle("Task", postFixName), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser());
taskArtWf1.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, teamArt.getCurrentStateName());
taskArtWf1.persist("AtsTestUtil - addTaskWf1");
}
@@ -368,7 +367,7 @@ public class AtsTestUtil {
public static TaskArtifact getOrCreateTaskOffTeamWf2() throws OseeCoreException {
ensureLoaded();
if (taskArtWf2 == null) {
- taskArtWf2 = teamArt.createNewTask(getTitle("Task", postFixName), new Date(), AtsUsersClient.getUser());
+ taskArtWf2 = teamArt.createNewTask(getTitle("Task", postFixName), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser());
taskArtWf2.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, teamArt.getCurrentStateName());
taskArtWf2.persist("AtsTestUtil - addTaskWf2");
}
@@ -381,12 +380,12 @@ public class AtsTestUtil {
List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>();
options.add(new SimpleDecisionReviewOption(DecisionReviewState.Completed.getName(), false, null));
options.add(new SimpleDecisionReviewOption(DecisionReviewState.Followup.getName(), true,
- Arrays.asList(AtsUsersClient.getUser().getUserId())));
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser().getUserId())));
decRevArt =
DecisionReviewManager.createNewDecisionReview(teamArt, reviewBlockType,
AtsTestUtil.class.getSimpleName() + " Test Decision Review", relatedToState.getName(),
- "Decision Review", options, Arrays.asList(AtsUsersClient.getUser()), new Date(),
- AtsUsersClient.getUser());
+ "Decision Review", options, Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), new Date(),
+ AtsClientService.get().getUserAdmin().getCurrentUser());
}
return decRevArt;
}
@@ -601,7 +600,7 @@ public class AtsTestUtil {
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), AtsTestUtil.class.getSimpleName());
actionArt2 =
ActionManager.createAction(null, getTitle("Team WF2", postFixName), "description", ChangeType.Improvement,
- "1", false, null, Arrays.asList(testAi2), new Date(), AtsUsersClient.getUser(), null, transaction);
+ "1", false, null, Arrays.asList(testAi2), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
teamArt2 = actionArt2.getFirstTeam();
transaction.execute();
@@ -621,7 +620,7 @@ public class AtsTestUtil {
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), AtsTestUtil.class.getSimpleName());
actionArt3 =
ActionManager.createAction(null, getTitle("Team WF3", postFixName), "description", ChangeType.Improvement,
- "1", false, null, Arrays.asList(testAi3), new Date(), AtsUsersClient.getUser(), null, transaction);
+ "1", false, null, Arrays.asList(testAi3), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
teamArt3 = actionArt3.getFirstTeam();
transaction.execute();
@@ -641,7 +640,7 @@ public class AtsTestUtil {
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), AtsTestUtil.class.getSimpleName());
actionArt4 =
ActionManager.createAction(null, getTitle("Team WF4", postFixName), "description", ChangeType.Improvement,
- "1", false, null, Arrays.asList(testAi4), new Date(), AtsUsersClient.getUser(), null, transaction);
+ "1", false, null, Arrays.asList(testAi4), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
teamArt4 = actionArt4.getFirstTeam();
AtsVersionService.get().setTargetedVersion(teamArt4, verArt4);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java
index 917ca81534..1c3ab8eb80 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java
@@ -12,9 +12,9 @@ package org.eclipse.osee.ats.client.integration.tests.ats.core.client;
import junit.framework.Assert;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionOption;
import org.eclipse.osee.ats.core.config.AtsVersionService;
@@ -147,13 +147,13 @@ public class AtsTestUtilTest extends AtsTestUtil {
SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), "test");
Result result =
- AtsTestUtil.transitionTo(AtsTestUtilState.Implement, AtsUsersClient.getUser(), transaction,
+ AtsTestUtil.transitionTo(AtsTestUtilState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), transaction,
TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
Assert.assertEquals(Result.TrueResult, result);
Assert.assertEquals(teamArt.getCurrentStateName(), TeamState.Implement.getName());
result =
- AtsTestUtil.transitionTo(AtsTestUtilState.Completed, AtsUsersClient.getUser(), transaction,
+ AtsTestUtil.transitionTo(AtsTestUtilState.Completed, AtsClientService.get().getUserAdmin().getCurrentUser(), transaction,
TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
Assert.assertEquals(Result.TrueResult, result);
Assert.assertEquals(teamArt.getCurrentStateName(), TeamState.Completed.getName());
@@ -176,7 +176,7 @@ public class AtsTestUtilTest extends AtsTestUtil {
SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), "test");
Result result =
- AtsTestUtil.transitionTo(AtsTestUtilState.Cancelled, AtsUsersClient.getUser(), transaction,
+ AtsTestUtil.transitionTo(AtsTestUtilState.Cancelled, AtsClientService.get().getUserAdmin().getCurrentUser(), transaction,
TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
Assert.assertEquals(Result.TrueResult, result);
Assert.assertEquals(teamArt.getCurrentStateName(), TeamState.Cancelled.getName());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java
index d51877a3f6..35692eed65 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java
@@ -18,6 +18,7 @@ import junit.framework.Assert;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil.AtsTestUtilState;
import org.eclipse.osee.ats.core.client.action.ActionArtifact;
@@ -32,7 +33,6 @@ import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.workflow.ChangeType;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionOption;
@@ -96,7 +96,8 @@ public class AtsNotificationManagerTest {
UserManager.getUser(DemoUsers.Alex_Kay).persist(getClass().getSimpleName());
// reset the originator
- teamArt.setCreatedBy(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay), false, new Date());
+ teamArt.setCreatedBy(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay), false,
+ new Date());
// persist will kick event which will log the notification event and send
teamArt.persist("Change originator");
@@ -110,7 +111,8 @@ public class AtsNotificationManagerTest {
//---------------------------------------------------
// reset the originator back to joe smith
- teamArt.setCreatedBy(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith), false, new Date());
+ teamArt.setCreatedBy(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith), false,
+ new Date());
// persist will kick event which will log the notification event and send
teamArt.persist("Change originator");
AtsNotificationManager.setInTest(true);
@@ -124,7 +126,8 @@ public class AtsNotificationManagerTest {
UserManager.getUser(DemoUsers.Alex_Kay).persist(getClass().getSimpleName());
// reset the originator
- teamArt.setCreatedBy(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay), false, new Date());
+ teamArt.setCreatedBy(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay), false,
+ new Date());
// persist will kick event which will log the notification event and send
teamArt.persist("Change originator");
@@ -136,7 +139,8 @@ public class AtsNotificationManagerTest {
//---------------------------------------------------
// reset the originator back to joe smith
- teamArt.setCreatedBy(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith), false, new Date());
+ teamArt.setCreatedBy(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith), false,
+ new Date());
// persist will kick event which will log the notification event and send
teamArt.persist("Change originator");
AtsNotificationManager.setInTest(true);
@@ -150,7 +154,8 @@ public class AtsNotificationManagerTest {
UserManager.getUser(DemoUsers.Alex_Kay).persist(getClass().getSimpleName());
// reset the originator
- teamArt.setCreatedBy(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay), false, new Date());
+ teamArt.setCreatedBy(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay), false,
+ new Date());
// persist will kick event which will log the notification event and send
teamArt.persist("Change originator");
@@ -195,7 +200,7 @@ public class AtsNotificationManagerTest {
UserManager.getUser().setEmail("joe.smith@boeing.com");
users.add(UserManager.getUser());
- teamArt.getStateMgr().addAssignees(AtsUsersClient.getAtsUsers(users));
+ teamArt.getStateMgr().addAssignees(AtsClientService.get().getUserAdmin().getAtsUsers(users));
// verify notification exists now only for active, valid email Alex, not for others
Assert.assertEquals(1, mgr.getNotificationEvents().size());
@@ -230,7 +235,7 @@ public class AtsNotificationManagerTest {
User Alex_Kay = UserManager.getUser(DemoUsers.Alex_Kay);
Alex_Kay.setSoleAttributeValue(CoreAttributeTypes.Email, "alex.kay@boeing.com");
Alex_Kay.persist(getClass().getSimpleName());
- teamArt.getStateMgr().addAssignee(AtsUsersClient.getUserFromOseeUser(Alex_Kay));
+ teamArt.getStateMgr().addAssignee(AtsClientService.get().getUserAdmin().getUserFromOseeUser(Alex_Kay));
teamArt.persist(getClass().getSimpleName());
Assert.assertEquals("Alex and Joe should be assigned; currently = " + teamArt.getStateMgr().getAssigneesStr(), 2,
teamArt.getStateMgr().getAssignees().size());
@@ -253,7 +258,7 @@ public class AtsNotificationManagerTest {
usersToSet.add(UserManager.getUser());
usersToSet.add(Alex_Kay);
- teamArt.getStateMgr().setAssignees(AtsUsersClient.getAtsUsers(usersToSet));
+ teamArt.getStateMgr().setAssignees(AtsClientService.get().getUserAdmin().getAtsUsers(usersToSet));
// verify notification exists now only for Jason_Michael, not for others
Assert.assertEquals(1, mgr.getNotificationEvents().size());
@@ -283,7 +288,8 @@ public class AtsNotificationManagerTest {
// set originator as Alex Kay
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
- teamArt.setCreatedBy(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay), false, new Date());
+ teamArt.setCreatedBy(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay), false,
+ new Date());
teamArt.persist(getClass().getSimpleName() + " - set originator");
// set alex kay having valid email address
@@ -297,7 +303,8 @@ public class AtsNotificationManagerTest {
SkynetTransaction transaction =
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
Result result =
- AtsTestUtil.transitionTo(AtsTestUtilState.Completed, AtsUsersClient.getUser(), transaction,
+ AtsTestUtil.transitionTo(AtsTestUtilState.Completed,
+ AtsClientService.get().getUserAdmin().getCurrentUser(), transaction,
TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
Assert.assertEquals(Result.TrueResult, result);
Assert.assertEquals(teamArt.getCurrentStateName(), TeamState.Completed.getName());
@@ -325,7 +332,8 @@ public class AtsNotificationManagerTest {
// set originator as Alex Kay
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
- teamArt.setCreatedBy(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay), false, new Date());
+ teamArt.setCreatedBy(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay), false,
+ new Date());
teamArt.persist(getClass().getSimpleName() + " - set originator");
// set alex kay having valid email address
@@ -339,7 +347,8 @@ public class AtsNotificationManagerTest {
SkynetTransaction transaction =
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
Result result =
- AtsTestUtil.transitionTo(AtsTestUtilState.Cancelled, AtsUsersClient.getUser(), transaction,
+ AtsTestUtil.transitionTo(AtsTestUtilState.Cancelled,
+ AtsClientService.get().getUserAdmin().getCurrentUser(), transaction,
TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
Assert.assertEquals(Result.TrueResult, result);
Assert.assertEquals(teamArt.getCurrentStateName(), TeamState.Cancelled.getName());
@@ -371,7 +380,8 @@ public class AtsNotificationManagerTest {
alex.setSoleAttributeValue(CoreAttributeTypes.Email, "alex.kay@boeing.com");
alex.persist(getClass().getSimpleName() + "- set alex email address");
- AtsTestUtil.getTestTeamDef().getSubscribed().add(AtsUsersClient.getUserFromOseeUser(alex));
+ AtsTestUtil.getTestTeamDef().getSubscribed().add(
+ AtsClientService.get().getUserAdmin().getUserFromOseeUser(alex));
mgr.clear();
@@ -381,7 +391,7 @@ public class AtsNotificationManagerTest {
ActionArtifact actionArt =
ActionManager.createAction(null, getClass().getSimpleName() + " - testSubscribedTeam", "description",
ChangeType.Improvement, "1", false, null, Arrays.asList(AtsTestUtil.getTestAi()), new Date(),
- AtsUsersClient.getUser(), null, transaction);
+ AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
// verify notification to subscriber
Assert.assertEquals(1, mgr.getNotificationEvents().size());
@@ -424,7 +434,7 @@ public class AtsNotificationManagerTest {
alex.setSoleAttributeValue(CoreAttributeTypes.Email, "alex.kay@boeing.com");
alex.persist(getClass().getSimpleName() + "- set alex email address");
- AtsTestUtil.getTestAi().getSubscribed().add(AtsUsersClient.getUserFromOseeUser(alex));
+ AtsTestUtil.getTestAi().getSubscribed().add(AtsClientService.get().getUserAdmin().getUserFromOseeUser(alex));
mgr.clear();
@@ -434,7 +444,7 @@ public class AtsNotificationManagerTest {
ActionArtifact actionArt =
ActionManager.createAction(null, getClass().getSimpleName() + " - testSubscribedAI", "description",
ChangeType.Improvement, "1", false, null, Arrays.asList(AtsTestUtil.getTestAi()), new Date(),
- AtsUsersClient.getUser(), null, transaction);
+ AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
// verify notification to subscriber
Assert.assertEquals(1, mgr.getNotificationEvents().size());
@@ -487,7 +497,8 @@ public class AtsNotificationManagerTest {
SkynetTransaction transaction =
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
Result result =
- AtsTestUtil.transitionTo(AtsTestUtilState.Implement, AtsUsersClient.getUser(), transaction,
+ AtsTestUtil.transitionTo(AtsTestUtilState.Implement,
+ AtsClientService.get().getUserAdmin().getCurrentUser(), transaction,
TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
Assert.assertEquals(Result.TrueResult, result);
transaction.execute();
@@ -529,18 +540,20 @@ public class AtsNotificationManagerTest {
PeerToPeerReviewArtifact peerArt =
AtsTestUtil.getOrCreatePeerReview(ReviewBlockType.None, AtsTestUtilState.Analyze, transaction);
List<UserRole> roles = new ArrayList<UserRole>();
- UserRole author = new UserRole(Role.Author, AtsUsersClient.getUserFromOseeUser(alex));
+ UserRole author = new UserRole(Role.Author, AtsClientService.get().getUserAdmin().getUserFromOseeUser(alex));
roles.add(author);
- UserRole moderator = new UserRole(Role.Moderator, AtsUsersClient.getUserFromOseeUser(kay));
+ UserRole moderator =
+ new UserRole(Role.Moderator, AtsClientService.get().getUserAdmin().getUserFromOseeUser(kay));
roles.add(moderator);
- UserRole reviewer1 = new UserRole(Role.Reviewer, AtsUsersClient.getUser());
+ UserRole reviewer1 = new UserRole(Role.Reviewer, AtsClientService.get().getUserAdmin().getCurrentUser());
roles.add(reviewer1);
- UserRole reviewer2 = new UserRole(Role.Reviewer, AtsUsersClient.getUserFromToken(DemoUsers.Jason_Michael));
+ UserRole reviewer2 =
+ new UserRole(Role.Reviewer, AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Jason_Michael));
roles.add(reviewer2);
Result result =
PeerToPeerReviewManager.transitionTo(peerArt, PeerToPeerReviewState.Review, roles, null,
- AtsUsersClient.getUser(), false, transaction);
+ AtsClientService.get().getUserAdmin().getCurrentUser(), false, transaction);
Assert.assertEquals(Result.TrueResult, result);
peerArt.persist(transaction);
transaction.execute();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotifyUsersTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotifyUsersTest.java
index b24dafb1ec..4c5e527e82 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotifyUsersTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotifyUsersTest.java
@@ -17,6 +17,7 @@ import java.util.Date;
import java.util.List;
import org.eclipse.osee.ats.client.demo.DemoActionableItems;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.core.client.action.ActionManager;
import org.eclipse.osee.ats.core.client.notify.AtsNotificationManager;
@@ -25,7 +26,6 @@ import org.eclipse.osee.ats.core.client.notify.AtsNotifyType;
import org.eclipse.osee.ats.core.client.notify.AtsNotifyUsers;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.util.SubscribeManager;
import org.eclipse.osee.ats.core.client.workflow.ChangeType;
@@ -109,11 +109,11 @@ public class AtsNotifyUsersTest {
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
teamArt.setName(AtsNotifyUsersTest.class.getSimpleName() + "-testNotify");
- teamArt.internalSetCreatedBy(AtsUsersClient.getUserFromOseeUser(kay_ValidEmail));
+ teamArt.internalSetCreatedBy(AtsClientService.get().getUserAdmin().getUserFromOseeUser(kay_ValidEmail));
List<User> assignees = new ArrayList<User>();
assignees.addAll(Arrays.asList(inactiveSteve, alex_NoValidEmail, jason_ValidEmail, kay_ValidEmail,
joeSmith_CurrentUser));
- teamArt.getStateMgr().setAssignees(AtsUsersClient.getAtsUsers(assignees));
+ teamArt.getStateMgr().setAssignees(AtsClientService.get().getUserAdmin().getAtsUsers(assignees));
teamArt.persist(transaction);
transaction.execute();
@@ -128,11 +128,11 @@ public class AtsNotifyUsersTest {
event.getDescription());
notifyManager.clear();
- teamArt.internalSetCreatedBy(AtsUsersClient.getUserFromOseeUser(inactiveSteve));
+ teamArt.internalSetCreatedBy(AtsClientService.get().getUserAdmin().getUserFromOseeUser(inactiveSteve));
teamArt.persist(getClass().getSimpleName());
AtsNotificationManager.notify(teamArt, AtsNotifyType.Originator);
Assert.assertEquals(0, notifyManager.getNotificationEvents().size());
- teamArt.internalSetCreatedBy(AtsUsersClient.getUserFromOseeUser(kay_ValidEmail));
+ teamArt.internalSetCreatedBy(AtsClientService.get().getUserAdmin().getUserFromOseeUser(kay_ValidEmail));
teamArt.persist(getClass().getSimpleName());
notifyManager.clear();
@@ -154,7 +154,8 @@ public class AtsNotifyUsersTest {
notifyManager.clear();
AtsNotificationManager.notify(teamArt,
- Collections.singleton(AtsUsersClient.getUserFromOseeUser(jason_ValidEmail)), AtsNotifyType.Assigned);
+ Collections.singleton(AtsClientService.get().getUserAdmin().getUserFromOseeUser(jason_ValidEmail)),
+ AtsNotifyType.Assigned);
Assert.assertEquals(1, notifyManager.getNotificationEvents().size());
event = notifyManager.getNotificationEvents().get(0);
Assert.assertEquals(AtsNotifyType.Assigned.name(), event.getType());
@@ -169,7 +170,8 @@ public class AtsNotifyUsersTest {
SubscribeManager.toggleSubscribe(teamArt);
transaction =
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), "AtsNotifyUsersTests.toggle.subscribed");
- SubscribeManager.addSubscribed(teamArt, AtsUsersClient.getUserFromOseeUser(inactiveSteve), transaction);
+ SubscribeManager.addSubscribed(teamArt,
+ AtsClientService.get().getUserAdmin().getUserFromOseeUser(inactiveSteve), transaction);
transaction.execute();
AtsNotificationManager.notify(teamArt, AtsNotifyType.Subscribed);
Assert.assertEquals(1, notifyManager.getNotificationEvents().size());
@@ -186,7 +188,8 @@ public class AtsNotifyUsersTest {
Assert.assertEquals(0, notifyManager.getNotificationEvents().size());
notifyManager.clear();
- teamArt.getStateMgr().initializeStateMachine(TeamState.Completed, null, AtsUsersClient.getUser());
+ teamArt.getStateMgr().initializeStateMachine(TeamState.Completed, null,
+ AtsClientService.get().getUserAdmin().getCurrentUser());
AtsNotificationManager.notify(teamArt, AtsNotifyType.Completed);
event = notifyManager.getNotificationEvents().get(0);
Assert.assertEquals(AtsNotifyType.Completed.name(), event.getType());
@@ -195,16 +198,18 @@ public class AtsNotifyUsersTest {
event.getDescription());
notifyManager.clear();
- teamArt.internalSetCreatedBy(AtsUsersClient.getUserFromOseeUser(inactiveSteve));
+ teamArt.internalSetCreatedBy(AtsClientService.get().getUserAdmin().getUserFromOseeUser(inactiveSteve));
teamArt.persist(getClass().getSimpleName());
- teamArt.getStateMgr().initializeStateMachine(TeamState.Completed, null, AtsUsersClient.getUser());
+ teamArt.getStateMgr().initializeStateMachine(TeamState.Completed, null,
+ AtsClientService.get().getUserAdmin().getCurrentUser());
AtsNotificationManager.notify(teamArt, AtsNotifyType.Completed);
Assert.assertEquals(0, notifyManager.getNotificationEvents().size());
- teamArt.internalSetCreatedBy(AtsUsersClient.getUserFromOseeUser(kay_ValidEmail));
+ teamArt.internalSetCreatedBy(AtsClientService.get().getUserAdmin().getUserFromOseeUser(kay_ValidEmail));
teamArt.persist(getClass().getSimpleName());
notifyManager.clear();
- teamArt.getStateMgr().initializeStateMachine(TeamState.Analyze, null, AtsUsersClient.getUser());
+ teamArt.getStateMgr().initializeStateMachine(TeamState.Analyze, null,
+ AtsClientService.get().getUserAdmin().getCurrentUser());
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt), TeamState.Cancelled.getName(), null,
"this is the reason", TransitionOption.OverrideTransitionValidityCheck);
@@ -240,7 +245,7 @@ public class AtsNotifyUsersTest {
ActionManager.createAction(null, getClass().getSimpleName() + "-OnNewAction", "Description",
ChangeType.Improvement, "2", false, null,
ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_SW_Design.getName())), new Date(),
- AtsUsersClient.getUser(), null, transaction);
+ AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
transaction.execute();
Assert.assertEquals(1, notifyManager.getNotificationEvents().size());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewDefinitionManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewDefinitionManagerTest.java
index 630b084840..76fb9f02d7 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewDefinitionManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewDefinitionManagerTest.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.api.workdef.StateEventType;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.workflow.transition.MockTransitionHelper;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
@@ -24,7 +25,6 @@ import org.eclipse.osee.ats.core.client.review.DecisionReviewManager;
import org.eclipse.osee.ats.core.client.review.DecisionReviewState;
import org.eclipse.osee.ats.core.client.review.ReviewManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionManager;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionOption;
@@ -76,7 +76,7 @@ public class DecisionReviewDefinitionManagerTest extends DecisionReviewDefinitio
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt), implement.getName(),
- Arrays.asList(AtsUsersClient.getUser()), null, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper, transaction);
TransitionResults results = transMgr.handleAll();
transaction.execute();
@@ -122,7 +122,7 @@ public class DecisionReviewDefinitionManagerTest extends DecisionReviewDefinitio
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt), implement.getName(),
- Arrays.asList(AtsUsersClient.getUser()), null, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper, transaction);
TransitionResults results = transMgr.handleAll();
transaction.execute();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java
index d41cab8f06..0670212c96 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java
@@ -19,13 +19,13 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.workdef.IAtsDecisionReviewOption;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.client.review.DecisionReviewManager;
import org.eclipse.osee.ats.core.client.review.DecisionReviewState;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.mocks.MockDecisionReviewOption;
import org.eclipse.osee.framework.core.enums.SystemUser;
@@ -63,7 +63,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager {
List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>();
options.add(new MockDecisionReviewOption(DecisionReviewState.Completed.getName(), false, null));
options.add(new MockDecisionReviewOption(DecisionReviewState.Followup.getName(), true,
- Arrays.asList(AtsUsersClient.getUser().getUserId())));
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser().getUserId())));
// create and transition decision review
SkynetTransaction transaction =
@@ -72,7 +72,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager {
DecisionReviewArtifact decRev =
DecisionReviewManager.createNewDecisionReviewAndTransitionToDecision(teamWf, reviewTitle, "my description",
AtsTestUtil.getAnalyzeStateDef().getName(), ReviewBlockType.Transition, options,
- Arrays.asList(AtsUsersClient.getUser()), new Date(), AtsUsersClient.getUser(), transaction);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), transaction);
transaction.execute();
Assert.assertNotNull(decRev);
@@ -92,7 +92,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager {
List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>();
options.add(new MockDecisionReviewOption(DecisionReviewState.Completed.getName(), false, null));
options.add(new MockDecisionReviewOption(DecisionReviewState.Followup.getName(), true,
- Arrays.asList(AtsUsersClient.getUser().getUserId())));
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser().getUserId())));
// create and transition decision review
SkynetTransaction transaction =
@@ -101,8 +101,8 @@ public class DecisionReviewManagerTest extends DecisionReviewManager {
DecisionReviewArtifact decRev =
DecisionReviewManager.createNewDecisionReviewAndTransitionToDecision(teamWf, reviewTitle, "my description",
AtsTestUtil.getAnalyzeStateDef().getName(), ReviewBlockType.Transition, options,
- Arrays.asList(AtsUsersClient.getUserFromToken(SystemUser.UnAssigned)), new Date(),
- AtsUsersClient.getUser(), transaction);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getUserFromToken(SystemUser.UnAssigned)), new Date(),
+ AtsClientService.get().getUserAdmin().getCurrentUser(), transaction);
transaction.execute();
Assert.assertNotNull(decRev);
@@ -124,7 +124,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager {
DecisionReviewArtifact decRev =
DecisionReviewManager.createNewDecisionReview(teamWf, ReviewBlockType.Commit, reviewTitle,
TeamState.Implement.getName(), "description", DecisionReviewManager.getDefaultDecisionReviewOptions(),
- Arrays.asList(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay)), new Date(), AtsUsersClient.getUser());
+ Arrays.asList(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay)), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser());
Assert.assertNotNull(decRev);
Assert.assertEquals(reviewTitle, decRev.getName());
@@ -143,7 +143,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager {
DecisionReviewArtifact decRev =
DecisionReviewManager.createNewDecisionReview(teamWf, ReviewBlockType.Commit, reviewTitle,
TeamState.Implement.getName(), "description", DecisionReviewManager.getDefaultDecisionReviewOptions(),
- Arrays.asList(AtsUsersClient.getUserFromToken(SystemUser.UnAssigned)), new Date(), AtsUsersClient.getUser());
+ Arrays.asList(AtsClientService.get().getUserAdmin().getUserFromToken(SystemUser.UnAssigned)), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser());
Assert.assertNotNull(decRev);
Assert.assertEquals(reviewTitle, decRev.getName());
@@ -157,7 +157,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager {
DecisionReviewArtifact decRev =
DecisionReviewManager.createNewDecisionReview(teamWf, ReviewBlockType.Commit, true, new Date(),
- AtsUsersClient.getUser());
+ AtsClientService.get().getUserAdmin().getCurrentUser());
Assert.assertNotNull(decRev);
Assert.assertEquals("Should we do this? Yes will require followup, No will not", decRev.getName());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerReviewDefinitionManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerReviewDefinitionManagerTest.java
index c758217e57..70003738eb 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerReviewDefinitionManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerReviewDefinitionManagerTest.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.api.workdef.StateEventType;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.workflow.transition.MockTransitionHelper;
import org.eclipse.osee.ats.core.client.review.PeerReviewDefinitionManager;
@@ -23,7 +24,6 @@ import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
import org.eclipse.osee.ats.core.client.review.ReviewManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionManager;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionOption;
@@ -73,7 +73,7 @@ public class PeerReviewDefinitionManagerTest extends PeerReviewDefinitionManager
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt), implement.getName(),
- Arrays.asList(AtsUsersClient.getUser()), null, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper, transaction);
TransitionResults results = transMgr.handleAll();
transaction.execute();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerToPeerReviewManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerToPeerReviewManagerTest.java
index f3cfaa981c..b0f19f0e56 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerToPeerReviewManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/PeerToPeerReviewManagerTest.java
@@ -13,12 +13,12 @@ package org.eclipse.osee.ats.client.integration.tests.ats.core.client.review;
import java.util.Date;
import junit.framework.Assert;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewManager;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
@@ -52,7 +52,7 @@ public class PeerToPeerReviewManagerTest extends PeerToPeerReviewManager {
PeerToPeerReviewArtifact peerArt =
PeerToPeerReviewManager.createNewPeerToPeerReview(teamArt, reviewTitle,
- AtsTestUtil.getAnalyzeStateDef().getName(), new Date(), AtsUsersClient.getUser(), transaction);
+ AtsTestUtil.getAnalyzeStateDef().getName(), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), transaction);
transaction.execute();
Assert.assertNotNull(peerArt);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java
index 24f791b0c8..bcaaf692b5 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java
@@ -21,7 +21,7 @@ import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.task.TaskManager;
import org.eclipse.osee.ats.core.client.task.TaskStates;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
+
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.workflow.HoursSpentUtil;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -162,7 +162,7 @@ public class TaskManagerTest extends TaskManager {
transaction =
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(),
getClass().getSimpleName() + " testTransitionToCompletedThenInWork() 2");
- result = TaskManager.transitionToInWork(taskArt, AtsUsersClient.getUser(), 45, .5, transaction);
+ result = TaskManager.transitionToInWork(taskArt, AtsClientService.get().getUserAdmin().getCurrentUser(), 45, .5, transaction);
Assert.assertEquals(Result.TrueResult, result);
transaction.execute();
Assert.assertEquals(TaskStates.InWork.getName(), taskArt.getCurrentStateName());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java
index 14b3b6d7d3..ecb3558621 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java
@@ -34,7 +34,7 @@ import org.eclipse.osee.ats.core.client.task.createtasks.TaskOpModify;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.config.AtsVersionService;
-import org.eclipse.osee.ats.core.users.AtsUsers;
+import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.exception.MultipleAttributesExist;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -308,15 +308,15 @@ public class CreateTasksOperationTest {
Date createdDate = new Date();
TaskArtifact task01 =
- destTeamWf.createNewTask(artifactNamePrefix + " Task 01", createdDate, AtsUsers.getSystemUser());
+ destTeamWf.createNewTask(artifactNamePrefix + " Task 01", createdDate, AtsCoreUsers.SYSTEM_USER);
TaskArtifact task02 =
- destTeamWf.createNewTask(artifactNamePrefix + " Task 02", createdDate, AtsUsers.getSystemUser());
+ destTeamWf.createNewTask(artifactNamePrefix + " Task 02", createdDate, AtsCoreUsers.SYSTEM_USER);
TaskArtifact task03 =
- destTeamWf.createNewTask(artifactNamePrefix + " Task 03", createdDate, AtsUsers.getSystemUser());
+ destTeamWf.createNewTask(artifactNamePrefix + " Task 03", createdDate, AtsCoreUsers.SYSTEM_USER);
TaskArtifact task04 =
- destTeamWf.createNewTask(artifactNamePrefix + " Task 04", createdDate, AtsUsers.getSystemUser());
+ destTeamWf.createNewTask(artifactNamePrefix + " Task 04", createdDate, AtsCoreUsers.SYSTEM_USER);
TaskArtifact task05 =
- destTeamWf.createNewTask(artifactNamePrefix + " Task 05", createdDate, AtsUsers.getSystemUser());
+ destTeamWf.createNewTask(artifactNamePrefix + " Task 05", createdDate, AtsCoreUsers.SYSTEM_USER);
task01.setSoleAttributeFromString(AtsAttributeTypes.TaskToChangedArtifactReference, changeArt01.getGuid());
task02.setSoleAttributeFromString(AtsAttributeTypes.TaskToChangedArtifactReference, changeArt02.getGuid());
@@ -400,19 +400,19 @@ public class CreateTasksOperationTest {
Date createdDate = new Date();
TaskArtifact task01 =
destTeamWf.createNewTask(artifactNamePrefix + " Task 01 - No changed artifact", createdDate,
- AtsUsers.getSystemUser());
+ AtsCoreUsers.SYSTEM_USER);
TaskArtifact task02 =
destTeamWf.createNewTask(artifactNamePrefix + " Task 02 - No changed artifact", createdDate,
- AtsUsers.getSystemUser());
+ AtsCoreUsers.SYSTEM_USER);
TaskArtifact task03 =
destTeamWf.createNewTask(artifactNamePrefix + " Task 03 - No changed artifact", createdDate,
- AtsUsers.getSystemUser());
+ AtsCoreUsers.SYSTEM_USER);
TaskArtifact task04 =
destTeamWf.createNewTask(artifactNamePrefix + " Task 04 - No changed artifact", createdDate,
- AtsUsers.getSystemUser());
+ AtsCoreUsers.SYSTEM_USER);
TaskArtifact task05 =
destTeamWf.createNewTask(artifactNamePrefix + " Task 05 - No changed artifact", createdDate,
- AtsUsers.getSystemUser());
+ AtsCoreUsers.SYSTEM_USER);
SkynetTransaction transaction =
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(),
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsCoreClient_Util_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsCoreClient_Util_Suite.java
index c719757d9d..fcd7480bd4 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsCoreClient_Util_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsCoreClient_Util_Suite.java
@@ -20,7 +20,7 @@ import org.junit.runners.Suite;
* @author Donald G. Dunne
*/
@RunWith(Suite.class)
-@Suite.SuiteClasses({AtsUserTest.class, CopyActionDetailsTest.class})
+@Suite.SuiteClasses({AtsUsersTest.class, AtsUserTest.class, CopyActionDetailsTest.class})
public class AtsCoreClient_Util_Suite {
@BeforeClass
public static void setUp() throws Exception {
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java
index 5890e6296e..fc316d2518 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java
@@ -16,12 +16,13 @@ import java.util.HashSet;
import junit.framework.Assert;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.client.demo.DemoUsers;
-import org.eclipse.osee.ats.core.client.util.AtsUser;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.junit.Before;
import org.mockito.Mockito;
/**
@@ -29,31 +30,32 @@ import org.mockito.Mockito;
*/
public class AtsUserTest {
+ private IAtsUser atsUser;
+ private User user;
+
+ @Before
+ public void setUp() throws OseeCoreException {
+ user = UserManager.getUser();
+ atsUser = AtsClientService.get().getUserAdmin().getCurrentUser();
+ }
+
@org.junit.Test
public void testGetUserId() throws OseeCoreException {
- User user = UserManager.getUser();
- AtsUser atsUser = new AtsUser(user);
Assert.assertEquals(user.getUserId(), atsUser.getUserId());
}
@org.junit.Test
- public void testGetName() throws OseeCoreException {
- User user = UserManager.getUser();
- AtsUser atsUser = new AtsUser(user);
+ public void testGetName() {
Assert.assertEquals(user.getName(), atsUser.getName());
}
@org.junit.Test
public void testGetEmail() throws OseeCoreException {
- User user = UserManager.getUser();
- AtsUser atsUser = new AtsUser(user);
Assert.assertEquals(user.getEmail(), atsUser.getEmail());
}
@org.junit.Test
public void testEquals() throws OseeCoreException {
- User user = UserManager.getUser();
- AtsUser atsUser = new AtsUser(user);
Assert.assertEquals(atsUser, user);
IAtsUser atsUser2 = Mockito.mock(IAtsUser.class);
@@ -65,16 +67,16 @@ public class AtsUserTest {
@org.junit.Test
public void testRemove() throws OseeCoreException {
Collection<IAtsUser> assignees = new HashSet<IAtsUser>();
- assignees.add(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay));
- assignees.add(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ assignees.add(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay));
+ assignees.add(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
Assert.assertTrue(Collections.isEqual(
assignees,
- Arrays.asList(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay),
- AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith))));
+ Arrays.asList(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay),
+ AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith))));
- assignees.remove(AtsUsersClient.getUser());
+ assignees.remove(AtsClientService.get().getUserAdmin().getCurrentUser());
Assert.assertTrue(Collections.isEqual(assignees,
- Arrays.asList(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay))));
+ Arrays.asList(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay))));
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUsersTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUsersTest.java
new file mode 100644
index 0000000000..0e0cb18f20
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUsersTest.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.core.client.util;
+
+import junit.framework.Assert;
+import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.core.users.AtsCoreUsers;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.UserNotInDatabase;
+import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AtsUsersTest {
+
+ @Test
+ public void testGetUser() throws OseeCoreException {
+ Assert.assertEquals(AtsCoreUsers.SYSTEM_USER,
+ AtsClientService.get().getUserAdmin().getUserById(AtsCoreUsers.SYSTEM_USER.getUserId()));
+ Assert.assertEquals(AtsCoreUsers.GUEST_USER,
+ AtsClientService.get().getUserAdmin().getUserById(AtsCoreUsers.GUEST_USER.getUserId()));
+ Assert.assertEquals(AtsCoreUsers.UNASSIGNED_USER,
+ AtsClientService.get().getUserAdmin().getUserById(AtsCoreUsers.UNASSIGNED_USER.getUserId()));
+ }
+
+ @Test(expected = UserNotInDatabase.class)
+ public void testGetUserException() throws OseeCoreException {
+ Assert.assertNull(AtsClientService.get().getUserAdmin().getUserById("2345"));
+ }
+
+ @Test
+ public void testGetUserWithNull() throws OseeCoreException {
+ Assert.assertNull(AtsClientService.get().getUserAdmin().getUserById(null));
+ }
+
+ @Test
+ public void testGetGuestUser() {
+ Assert.assertEquals(AtsCoreUsers.GUEST_USER, AtsCoreUsers.GUEST_USER);
+ }
+
+ @Test
+ public void testGetSystemUser() {
+ Assert.assertEquals(AtsCoreUsers.SYSTEM_USER, AtsCoreUsers.SYSTEM_USER);
+ }
+
+ @Test
+ public void testGetUnAssigned() {
+ Assert.assertEquals(AtsCoreUsers.UNASSIGNED_USER, AtsCoreUsers.UNASSIGNED_USER);
+ }
+
+ @Test
+ public void testGetCurrentUser() throws OseeCoreException {
+ User currentUser = UserManager.getUser();
+
+ Assert.assertEquals(currentUser, AtsClientService.get().getUserAdmin().getCurrentOseeUser());
+
+ IAtsUser atsUser = AtsClientService.get().getUserAdmin().getUserById(currentUser.getUserId());
+
+ Assert.assertEquals(currentUser.getUserId(), atsUser.getUserId());
+ Assert.assertEquals(currentUser.getEmail(), atsUser.getEmail());
+ Assert.assertEquals(currentUser.isActive(), atsUser.isActive());
+ Assert.assertEquals(currentUser.getName(), atsUser.getName());
+ Assert.assertEquals(atsUser, AtsClientService.get().getUserAdmin().getCurrentUser());
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/note/NoteItemTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/note/NoteItemTest.java
index 947eb028cb..fcf7c8f5ed 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/note/NoteItemTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/note/NoteItemTest.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.ats.client.integration.tests.ats.core.client.workflow.n
import java.util.Arrays;
import java.util.Date;
import java.util.List;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.workflow.note.NoteItem;
import org.eclipse.osee.ats.core.client.workflow.note.NoteType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -30,26 +30,26 @@ public class NoteItemTest {
public void testNoteItemNoteTypeStringStringUserString() throws OseeCoreException {
Date date = new Date();
NoteItem item =
- new NoteItem(NoteType.Comment, "Implement", String.valueOf(date.getTime()), AtsUsersClient.getUser(), "my msg");
+ new NoteItem(NoteType.Comment, "Implement", String.valueOf(date.getTime()), AtsClientService.get().getUserAdmin().getCurrentUser(), "my msg");
validate(item, date);
}
public static void validate(NoteItem item, Date date) throws OseeCoreException {
Assert.assertEquals(NoteType.Comment, item.getType());
Assert.assertEquals("Implement", item.getState());
- Assert.assertEquals(AtsUsersClient.getUser(), item.getUser());
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getCurrentUser(), item.getUser());
Assert.assertEquals("my msg", item.getMsg());
}
public static NoteItem getTestNoteItem(Date date) throws OseeCoreException {
- return new NoteItem(NoteType.Comment, "Implement", String.valueOf(date.getTime()), AtsUsersClient.getUser(), "my msg");
+ return new NoteItem(NoteType.Comment, "Implement", String.valueOf(date.getTime()), AtsClientService.get().getUserAdmin().getCurrentUser(), "my msg");
}
@Test
public void testNoteItemStringStringStringUserString() throws OseeCoreException {
Date date = new Date();
NoteItem item =
- new NoteItem(NoteType.Comment.name(), "Implement", String.valueOf(date.getTime()), AtsUsersClient.getUser(),
+ new NoteItem(NoteType.Comment.name(), "Implement", String.valueOf(date.getTime()), AtsClientService.get().getUserAdmin().getCurrentUser(),
"my msg");
validate(item, date);
}
@@ -60,7 +60,7 @@ public class NoteItemTest {
NoteItem item = getTestNoteItem(date);
Assert.assertEquals(
- "Note: Comment from " + AtsUsersClient.getUser().getName() + " for \"Implement\" on " + DateUtil.getMMDDYYHHMM(date) + " - my msg",
+ "Note: Comment from " + AtsClientService.get().getUserAdmin().getCurrentUser().getName() + " for \"Implement\" on " + DateUtil.getMMDDYYHHMM(date) + " - my msg",
item.toString());
}
@@ -69,14 +69,14 @@ public class NoteItemTest {
Date date = new Date();
NoteItem item = getTestNoteItem(date);
NoteItem item2 =
- new NoteItem(NoteType.Question.name(), "Analyze", String.valueOf(date.getTime()), AtsUsersClient.getUser(),
+ new NoteItem(NoteType.Question.name(), "Analyze", String.valueOf(date.getTime()), AtsClientService.get().getUserAdmin().getCurrentUser(),
"another message");
String xml = NoteItem.toXml(Arrays.asList(item, item2));
Assert.assertEquals(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><AtsNote>" + //
- "<Item date=\"" + date.getTime() + "\" msg=\"my msg\" state=\"Implement\" type=\"Comment\" userId=\"" + AtsUsersClient.getUser().getUserId() + "\"/>" + //
- "<Item date=\"" + date.getTime() + "\" msg=\"another message\" state=\"Analyze\" type=\"Question\" userId=\"" + AtsUsersClient.getUser().getUserId() + "\"/></AtsNote>",
+ "<Item date=\"" + date.getTime() + "\" msg=\"my msg\" state=\"Implement\" type=\"Comment\" userId=\"" + AtsClientService.get().getUserAdmin().getCurrentUser().getUserId() + "\"/>" + //
+ "<Item date=\"" + date.getTime() + "\" msg=\"another message\" state=\"Analyze\" type=\"Question\" userId=\"" + AtsClientService.get().getUserAdmin().getCurrentUser().getUserId() + "\"/></AtsNote>",
xml);
List<NoteItem> items = NoteItem.fromXml(xml, "ASDF4");
@@ -85,7 +85,7 @@ public class NoteItemTest {
NoteItem fromXmlItem2 = items.get(1);
Assert.assertEquals(NoteType.Question, fromXmlItem2.getType());
Assert.assertEquals("Analyze", fromXmlItem2.getState());
- Assert.assertEquals(AtsUsersClient.getUser(), fromXmlItem2.getUser());
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getCurrentUser(), fromXmlItem2.getUser());
Assert.assertEquals("another message", fromXmlItem2.getMsg());
}
@@ -96,7 +96,7 @@ public class NoteItemTest {
NoteItem item = getTestNoteItem(date);
Assert.assertEquals(
- "<b>Note:</b>Comment from " + AtsUsersClient.getUser().getName() + " for \"Implement\" on " + DateUtil.getMMDDYYHHMM(date) + " - my msg",
+ "<b>Note:</b>Comment from " + AtsClientService.get().getUserAdmin().getCurrentUser().getName() + " for \"Implement\" on " + DateUtil.getMMDDYYHHMM(date) + " - my msg",
item.toHTML());
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java
index 14be4b7711..0bdc4ead76 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java
@@ -12,9 +12,9 @@ package org.eclipse.osee.ats.client.integration.tests.ats.core.client.workflow.t
import java.util.Collections;
import junit.framework.Assert;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.workflow.HoursSpentUtil;
import org.eclipse.osee.ats.core.client.workflow.StateManager;
import org.eclipse.osee.ats.core.client.workflow.transition.ITransitionHelper;
@@ -39,7 +39,7 @@ public class StateManagerTest {
ITransitionHelper helper =
new MockTransitionHelper("dodad", Collections.singletonList(teamWf),
- AtsTestUtil.getImplementStateDef().getName(), Collections.singleton(AtsUsersClient.getUser()), null);
+ AtsTestUtil.getImplementStateDef().getName(), Collections.singleton(AtsClientService.get().getUserAdmin().getCurrentUser()), null);
TransitionManager manager = new TransitionManager(helper);
TransitionResults results = manager.handleAll();
manager.getTransaction().execute();
@@ -48,7 +48,7 @@ public class StateManagerTest {
stateMgr.updateMetrics(AtsTestUtil.getImplementStateDef(), 2.2, 1, false);
helper =
new MockTransitionHelper("dodad", Collections.singletonList(teamWf),
- AtsTestUtil.getCompletedStateDef().getName(), Collections.singleton(AtsUsersClient.getUser()), null);
+ AtsTestUtil.getCompletedStateDef().getName(), Collections.singleton(AtsClientService.get().getUserAdmin().getCurrentUser()), null);
manager = new TransitionManager(helper);
results = manager.handleAll();
manager.getTransaction().execute();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java
index af920c3931..d42fc20962 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java
@@ -27,6 +27,7 @@ import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.api.workdef.RuleDefinitionOption;
import org.eclipse.osee.ats.api.workdef.WidgetOption;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil.AtsTestUtilState;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
@@ -36,7 +37,6 @@ import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.task.TaskManager;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.util.AtsUtilCore;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.client.workflow.transition.ITransitionListener;
@@ -76,7 +76,7 @@ public class TransitionManagerTest {
AtsTestUtil.cleanupAndReset("TransitionManagerTest-A");
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), EMPTY_AWAS, AtsTestUtil.getImplementStateDef().getName(),
- Arrays.asList(AtsUsersClient.getUser()), null, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
transMgr.handleTransitionValidation(results);
@@ -87,7 +87,7 @@ public class TransitionManagerTest {
public void testHandleTransitionValidation__ToStateNotNull() throws OseeCoreException {
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), Arrays.asList(AtsTestUtil.getTeamWf()), null,
- Arrays.asList(AtsUsersClient.getUser()), null, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
transMgr.handleTransitionValidation(results);
@@ -98,7 +98,7 @@ public class TransitionManagerTest {
public void testHandleTransitionValidation__InvalidToState() throws OseeCoreException {
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), Arrays.asList(AtsTestUtil.getTeamWf()), "InvalidStateName",
- Arrays.asList(AtsUsersClient.getUser()), null, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null, TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
transMgr.handleTransitionValidation(results);
@@ -114,7 +114,7 @@ public class TransitionManagerTest {
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -127,7 +127,7 @@ public class TransitionManagerTest {
results.clear();
Assert.assertFalse(helper.isPrivilegedEditEnabled());
Assert.assertFalse(helper.isOverrideAssigneeCheck());
- teamArt.getStateMgr().setAssignee(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay));
+ teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.contains(AtsTestUtil.getTeamWf(), TransitionResult.MUST_BE_ASSIGNED));
@@ -136,7 +136,7 @@ public class TransitionManagerTest {
Assert.assertFalse(helper.isOverrideAssigneeCheck());
helper.addTransitionOption(TransitionOption.PrivilegedEditEnabled);
Assert.assertTrue(helper.isPrivilegedEditEnabled());
- teamArt.getStateMgr().setAssignee(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay));
+ teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
@@ -146,7 +146,7 @@ public class TransitionManagerTest {
helper.addTransitionOption(TransitionOption.OverrideAssigneeCheck);
Assert.assertFalse(helper.isPrivilegedEditEnabled());
Assert.assertTrue(helper.isOverrideAssigneeCheck());
- teamArt.getStateMgr().setAssignee(AtsUsersClient.getUserFromToken(DemoUsers.Alex_Kay));
+ teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Alex_Kay));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
@@ -155,12 +155,12 @@ public class TransitionManagerTest {
helper.removeTransitionOption(TransitionOption.OverrideAssigneeCheck);
Assert.assertFalse(helper.isPrivilegedEditEnabled());
Assert.assertFalse(helper.isOverrideAssigneeCheck());
- teamArt.getStateMgr().setAssignee(AtsUsersClient.getUserFromToken(SystemUser.UnAssigned));
+ teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserAdmin().getUserFromToken(SystemUser.UnAssigned));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
// cleanup test
- teamArt.getStateMgr().setAssignee(AtsUsersClient.getUserFromToken(SystemUser.UnAssigned));
+ teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserAdmin().getUserFromToken(SystemUser.UnAssigned));
}
@org.junit.Test
@@ -169,7 +169,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -207,7 +207,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -233,7 +233,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
IAtsStateDefinition fromStateDef = AtsTestUtil.getAnalyzeStateDef();
fromStateDef.getLayoutItems().clear();
@@ -273,7 +273,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
IAtsStateDefinition fromStateDef = AtsTestUtil.getAnalyzeStateDef();
fromStateDef.getLayoutItems().clear();
@@ -328,7 +328,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -338,7 +338,7 @@ public class TransitionManagerTest {
Assert.assertTrue(results.isEmpty());
// validate that can't transition with InWork task
- TaskArtifact taskArt = teamArt.createNewTask("New Tasks", new Date(), AtsUsersClient.getUser());
+ TaskArtifact taskArt = teamArt.createNewTask("New Tasks", new Date(), AtsClientService.get().getUserAdmin().getCurrentUser());
results.clear();
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.contains(teamArt, TransitionResult.TASKS_NOT_COMPLETED));
@@ -359,7 +359,7 @@ public class TransitionManagerTest {
// attempt to transition parent to cancelled, should not be able to transition with un-completed/cancelled tasks
helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getCancelledStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getCancelledStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
transMgr = new TransitionManager(helper);
results.clear();
@@ -387,7 +387,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -415,7 +415,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -444,7 +444,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -478,7 +478,7 @@ public class TransitionManagerTest {
results.clear();
SkynetTransaction transaction =
TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), getClass().getSimpleName());
- DecisionReviewManager.transitionTo(decArt, DecisionReviewState.Completed, AtsUsersClient.getUser(), false,
+ DecisionReviewManager.transitionTo(decArt, DecisionReviewState.Completed, AtsClientService.get().getUserAdmin().getCurrentUser(), false,
transaction);
transaction.execute();
transMgr.handleTransitionValidation(results);
@@ -492,7 +492,7 @@ public class TransitionManagerTest {
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -569,7 +569,7 @@ public class TransitionManagerTest {
//1. Initially transition workflows to Implement
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt01, teamArt02),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -579,7 +579,7 @@ public class TransitionManagerTest {
//2. redundant transition workflows to Implement
MockTransitionHelper helper01 =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt01, teamArt02),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr01 = new TransitionManager(helper01);
TransitionResults results01 = new TransitionResults();
@@ -589,7 +589,7 @@ public class TransitionManagerTest {
//3. Transition one TeamWf to Complete
MockTransitionHelper helper02 =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt01),
- AtsTestUtil.getCompletedStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getCompletedStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr02 = new TransitionManager(helper02);
TransitionResults results02 = new TransitionResults();
@@ -599,7 +599,7 @@ public class TransitionManagerTest {
//4. redundant transition workflows to Implement
MockTransitionHelper helper03 =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt01, teamArt02),
- AtsTestUtil.getCompletedStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getCompletedStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr03 = new TransitionManager(helper03);
TransitionResults results03 = new TransitionResults();
@@ -659,7 +659,7 @@ public class TransitionManagerTest {
// Setup - Transition to Implement
SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtilCore.getAtsBranchToken(), "create");
Result result =
- AtsTestUtil.transitionTo(AtsTestUtilState.Implement, AtsUsersClient.getUser(), transaction,
+ AtsTestUtil.transitionTo(AtsTestUtilState.Implement, AtsClientService.get().getUserAdmin().getCurrentUser(), transaction,
TransitionOption.OverrideAssigneeCheck);
transaction.execute();
Assert.assertTrue("Transition Error: " + result.getText(), result.isTrue());
@@ -669,7 +669,7 @@ public class TransitionManagerTest {
// Transition to completed should set percent to 100
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getCompletedStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getCompletedStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
TransitionManager transMgr = new TransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -682,7 +682,7 @@ public class TransitionManagerTest {
// Transition to Implement should set percent to 0
helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getImplementStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
transMgr = new TransitionManager(helper);
results = new TransitionResults();
@@ -696,7 +696,7 @@ public class TransitionManagerTest {
// Transition to Cancelled should set percent to 0
helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
- AtsTestUtil.getCancelledStateDef().getName(), Arrays.asList(AtsUsersClient.getUser()), null,
+ AtsTestUtil.getCancelledStateDef().getName(), Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), null,
TransitionOption.None);
transMgr = new TransitionManager(helper);
results = new TransitionResults();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewDecisionStateItemTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewDecisionStateItemTest.java
index c4683981d6..d3b954dee9 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewDecisionStateItemTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewDecisionStateItemTest.java
@@ -16,11 +16,11 @@ import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.client.review.DecisionReviewManager;
import org.eclipse.osee.ats.core.client.review.DecisionReviewState;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.editor.stateItem.AtsDecisionReviewDecisionStateItem;
import org.eclipse.osee.ats.mocks.MockStateDefinition;
import org.eclipse.osee.ats.util.AtsUtil;
@@ -103,7 +103,7 @@ public class AtsDecisionReviewDecisionStateItemTest {
AtsDecisionReviewDecisionStateItem stateItem = new AtsDecisionReviewDecisionStateItem();
Collection<IAtsUser> users = stateItem.getOverrideTransitionToAssignees(decRevArt, decisionComboDam.get());
Assert.assertEquals(1, users.size());
- Assert.assertEquals(AtsUsersClient.getUser(), users.iterator().next());
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getCurrentUser(), users.iterator().next());
// Set No
decisionComboDam.set(2);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewPrepareStateItemTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewPrepareStateItemTest.java
index 893527cb63..67fb282620 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewPrepareStateItemTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsDecisionReviewPrepareStateItemTest.java
@@ -15,11 +15,11 @@ import java.util.Arrays;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.workdef.IStateToken;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.client.review.DecisionReviewManager;
import org.eclipse.osee.ats.core.client.review.DecisionReviewState;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.workflow.transition.TransitionResults;
import org.eclipse.osee.ats.editor.stateItem.AtsDecisionReviewPrepareStateItem;
import org.eclipse.osee.ats.util.AtsUtil;
@@ -77,7 +77,7 @@ public class AtsDecisionReviewPrepareStateItemTest {
// make call to state item that should set options based on artifact's attribute value
AtsDecisionReviewPrepareStateItem stateItem = new AtsDecisionReviewPrepareStateItem();
TransitionResults results = new TransitionResults();
- stateItem.transitioning(results, decRevArt, fromState, toState, Arrays.asList(AtsUsersClient.getUser()));
+ stateItem.transitioning(results, decRevArt, fromState, toState, Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()));
// verify no errors
Assert.assertTrue(results.toString(), results.isEmpty());
@@ -86,7 +86,7 @@ public class AtsDecisionReviewPrepareStateItemTest {
decisionOptionStr = decisionOptionStr.replaceFirst("Completed", "NoState");
decRevArt.setSoleAttributeValue(AtsAttributeTypes.DecisionReviewOptions, decisionOptionStr);
decRevArt.persist(getClass().getSimpleName());
- stateItem.transitioning(results, decRevArt, fromState, toState, Arrays.asList(AtsUsersClient.getUser()));
+ stateItem.transitioning(results, decRevArt, fromState, toState, Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()));
Assert.assertTrue(results.contains("Invalid Decision Option"));
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java
index 8008f2cc96..586cfca86a 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItemTest.java
@@ -15,11 +15,11 @@ import java.util.Arrays;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.api.workdef.RuleDefinitionOption;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.editor.stateItem.AtsForceAssigneesToTeamLeadsStateItem;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -74,14 +74,14 @@ public class AtsForceAssigneesToTeamLeadsStateItemTest {
// assignee should be Joe Smith
Assert.assertEquals(1, teamArt.getStateMgr().getAssignees().size());
- Assert.assertEquals(AtsUsersClient.getUserByName(JOE_SMITH),
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getUserByName(JOE_SMITH),
teamArt.getStateMgr().getAssignees().iterator().next());
// set assignee to Alex Kay
- teamArt.getStateMgr().setAssignee(AtsUsersClient.getUserByName(ALEX_KAY));
+ teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserAdmin().getUserByName(ALEX_KAY));
teamArt.persist(getClass().getSimpleName());
Assert.assertEquals(1, teamArt.getStateMgr().getAssignees().size());
- Assert.assertEquals(AtsUsersClient.getUserByName(ALEX_KAY),
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getUserByName(ALEX_KAY),
teamArt.getStateMgr().getAssignees().iterator().next());
IStateToken fromState = teamArt.getWorkDefinition().getStateByName(TeamState.Analyze.getName());
@@ -94,12 +94,12 @@ public class AtsForceAssigneesToTeamLeadsStateItemTest {
AtsForceAssigneesToTeamLeadsStateItem stateItem = new AtsForceAssigneesToTeamLeadsStateItem();
SkynetTransaction transaction =
TransactionManager.createTransaction(AtsUtil.getAtsBranch(), getClass().getSimpleName());
- stateItem.transitioned(teamArt, fromState, toState, Arrays.asList(AtsUsersClient.getUser()), transaction);
+ stateItem.transitioned(teamArt, fromState, toState, Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), transaction);
transaction.execute();
// assignee should be Joe Smith
Assert.assertEquals(1, teamArt.getStateMgr().getAssignees().size());
- Assert.assertEquals(AtsUsersClient.getUserByName(JOE_SMITH),
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getUserByName(JOE_SMITH),
teamArt.getStateMgr().getAssignees().iterator().next());
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java
index 3a614a6695..646dd39dc4 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java
@@ -22,7 +22,6 @@ import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
import org.eclipse.osee.ats.core.client.review.role.Role;
import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.editor.stateItem.AtsPeerToPeerReviewReviewStateItem;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -74,13 +73,13 @@ public class AtsPeerToPeerReviewReviewStateItemTest {
// assignee should be user creating review
Assert.assertEquals(1, peerRevArt.getStateMgr().getAssignees().size());
- Assert.assertEquals(AtsUsersClient.getUser(), peerRevArt.getStateMgr().getAssignees().iterator().next());
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getCurrentUser(), peerRevArt.getStateMgr().getAssignees().iterator().next());
// set roles
- UserRole userRole = new UserRole(Role.Author, AtsUsersClient.getUserByName("Joe Smith"));
+ UserRole userRole = new UserRole(Role.Author, AtsClientService.get().getUserAdmin().getUserByName("Joe Smith"));
UserRoleManager roleMgr = new UserRoleManager(peerRevArt);
roleMgr.addOrUpdateUserRole(userRole);
- userRole = new UserRole(Role.Reviewer, AtsUsersClient.getUserByName("Alex Kay"));
+ userRole = new UserRole(Role.Reviewer, AtsClientService.get().getUserAdmin().getUserByName("Alex Kay"));
SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtil.getAtsBranch(), "test transition");
roleMgr.addOrUpdateUserRole(userRole);
roleMgr.saveToArtifact(transaction);
@@ -90,10 +89,10 @@ public class AtsPeerToPeerReviewReviewStateItemTest {
Assert.assertEquals(2, peerRevArt.getStateMgr().getAssignees().size());
// change assignees back to single user so can test transition
- peerRevArt.getStateMgr().setAssignee(AtsUsersClient.getUser());
+ peerRevArt.getStateMgr().setAssignee(AtsClientService.get().getUserAdmin().getCurrentUser());
peerRevArt.persist(getClass().getSimpleName());
Assert.assertEquals(1, peerRevArt.getStateMgr().getAssignees().size());
- Assert.assertEquals(AtsUsersClient.getUser(), peerRevArt.getStateMgr().getAssignees().iterator().next());
+ Assert.assertEquals(AtsClientService.get().getUserAdmin().getCurrentUser(), peerRevArt.getStateMgr().getAssignees().iterator().next());
IStateToken fromState = peerRevArt.getWorkDefinition().getStateByName(PeerToPeerReviewState.Prepare.getName());
IStateToken toState = peerRevArt.getWorkDefinition().getStateByName(PeerToPeerReviewState.Review.getName());
@@ -101,7 +100,7 @@ public class AtsPeerToPeerReviewReviewStateItemTest {
// make call to state item that should set options based on artifact's attribute value
AtsPeerToPeerReviewReviewStateItem stateItem = new AtsPeerToPeerReviewReviewStateItem();
transaction = TransactionManager.createTransaction(AtsUtil.getAtsBranch(), "test transition");
- stateItem.transitioned(peerRevArt, fromState, toState, Arrays.asList(AtsUsersClient.getUser()), transaction);
+ stateItem.transitioned(peerRevArt, fromState, toState, Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), transaction);
transaction.execute();
// Joe and Alex should have been added to assignees
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java
index 6b47ee7e1f..50ecfe3e47 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java
@@ -31,12 +31,12 @@ import org.eclipse.osee.ats.client.demo.DemoArtifactToken;
import org.eclipse.osee.ats.client.demo.DemoArtifactTypes;
import org.eclipse.osee.ats.client.demo.DemoSawBuilds;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.config.AtsBranchConfigurationTest;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.NavigateTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.WorldEditorUtil;
import org.eclipse.osee.ats.core.client.team.TeamState;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
@@ -136,7 +136,7 @@ public class AtsNavigateItemsToWorldViewTest {
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
UserSearchWorkflowSearchItem dwl =
(UserSearchWorkflowSearchItem) editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- dwl.setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ dwl.setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
dwl.setSelected(UserSearchOption.Favorites, true);
runGeneralUserSearchTest(item, 3);
runGeneralXColTest(20, false);
@@ -162,7 +162,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.Subscribed, true);
editor.getWorldXWidgetActionPage().reSearch(true);
Collection<Artifact> arts = editor.getLoadedArtifacts();
@@ -177,7 +177,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.Assignee, true);
((UserSearchWorkflowSearchItem) dwl).setSelectedState(TeamState.Implement.getName());
editor.getWorldXWidgetActionPage().reSearch(true);
@@ -193,7 +193,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeReviews, true);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTeamWorkflows, false);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTasks, false);
@@ -213,7 +213,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeReviews, true);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTeamWorkflows, false);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTasks, false);
@@ -235,7 +235,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.Originator, true);
editor.getWorldXWidgetActionPage().reSearch(true);
@@ -255,7 +255,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.Originator, true);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeCompleted, true);
editor.getWorldXWidgetActionPage().reSearch(true);
@@ -285,7 +285,7 @@ public class AtsNavigateItemsToWorldViewTest {
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
UserSearchWorkflowSearchItem dwl =
(UserSearchWorkflowSearchItem) editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- dwl.setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ dwl.setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
dwl.setSelected(UserSearchOption.IncludeCompleted, true);
dwl.setSelected(UserSearchOption.IncludeTasks, false);
editor.getWorldXWidgetActionPage().reSearch(true);
@@ -315,7 +315,7 @@ public class AtsNavigateItemsToWorldViewTest {
"Testing User's items relating to " + DemoTestUtil.getDemoUser(DemoUsers.Kay_Jones));
XNavigateItem item = NavigateTestUtil.getAtsNavigateItems("User's World").iterator().next();
runGeneralLoadingTest(item, AtsArtifactTypes.AbstractWorkflowArtifact, 12,
- AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones));
+ AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones));
TestUtil.severeLoggingEnd(monitor);
}
@@ -326,7 +326,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeReviews, true);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTeamWorkflows, false);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTasks, false);
@@ -344,7 +344,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeReviews, true);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTeamWorkflows, false);
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.IncludeTasks, false);
@@ -363,7 +363,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.Favorites, true);
editor.getWorldXWidgetActionPage().reSearch(true);
Collection<Artifact> arts = editor.getLoadedArtifacts();
@@ -378,7 +378,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = openUserSearchEditor();
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
IDynamicWidgetLayoutListener dwl = editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener();
- ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones));
+ ((UserSearchWorkflowSearchItem) dwl).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones));
((UserSearchWorkflowSearchItem) dwl).setSelected(UserSearchOption.Subscribed, true);
editor.getWorldXWidgetActionPage().reSearch(true);
Collection<Artifact> arts = editor.getLoadedArtifacts();
@@ -450,7 +450,7 @@ public class AtsNavigateItemsToWorldViewTest {
private void runGeneralTeamWorkflowSearchOnAssigneeTest(XNavigateItem item, String assignee, int expectedNum) throws Exception {
WorldEditor editor = WorldEditorUtil.getSingleEditorOrFail();
- ((TeamWorkflowSearchWorkflowSearchItem) editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener()).setSelectedUser(AtsUsersClient.getUserByName(assignee));
+ ((TeamWorkflowSearchWorkflowSearchItem) editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener()).setSelectedUser(AtsClientService.get().getUserAdmin().getUserByName(assignee));
runGeneralTeamWorkflowSearchTest(item, expectedNum);
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewNavigateItemsToWorldViewTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewNavigateItemsToWorldViewTest.java
index cef6c46a3d..0b26f443c6 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewNavigateItemsToWorldViewTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewNavigateItemsToWorldViewTest.java
@@ -15,10 +15,10 @@ import java.util.Collection;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.NavigateTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.WorldEditorUtil;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.navigate.SearchNavigateItem;
import org.eclipse.osee.ats.navigate.VisitedItems;
import org.eclipse.osee.ats.review.GenerateReviewParticipationReport;
@@ -57,16 +57,16 @@ public class ReviewNavigateItemsToWorldViewTest {
public void testOtherUsersWorld_KayJones() throws Exception {
XNavigateItem item = NavigateTestUtil.getAtsNavigateItems("User's Reviews").iterator().next();
runGeneralLoadingTest(item, AtsArtifactTypes.PeerToPeerReview, 1,
- AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones));
+ AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones));
}
@org.junit.Test
public void testOtherUsersWorld_JoeSmith() throws Exception {
XNavigateItem item = NavigateTestUtil.getAtsNavigateItems("User's Reviews").iterator().next();
runGeneralLoadingTest(item, AtsArtifactTypes.DecisionReview, 2,
- AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
runGeneralLoadingTest(item, AtsArtifactTypes.PeerToPeerReview, 2,
- AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
}
@org.junit.Test
@@ -94,7 +94,7 @@ public class ReviewNavigateItemsToWorldViewTest {
MassArtifactEditor.closeAll();
XNavigateItem item =
NavigateTestUtil.getAtsNavigateItems("Generate Review Participation Report").iterator().next();
- ((GenerateReviewParticipationReport) item).setSelectedUser(AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith));
+ ((GenerateReviewParticipationReport) item).setSelectedUser(AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith));
item.run(TableLoadOption.ForcePend);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java
index 70600fcd9a..c2f3d189a6 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java
@@ -19,9 +19,9 @@ import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.client.demo.DemoUsers;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.NavigateTestUtil;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.navigate.VisitedItems;
import org.eclipse.osee.ats.review.ReviewWorldSearchItem;
@@ -43,7 +43,7 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testAiSearch() throws Exception {
- IAtsUser joe = AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith);
+ IAtsUser joe = AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith);
Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(Arrays.asList("SAW Code"));
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", aias, false, false, false, null, joe, null, null, null);
@@ -54,7 +54,7 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testState() throws Exception {
- IAtsUser joe = AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith);
+ IAtsUser joe = AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith);
Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(Arrays.asList("SAW Code"));
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", aias, false, false, false, null, joe, null, null, "Prepare");
@@ -75,7 +75,7 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testAssignee_Kay() throws Exception {
- IAtsUser Kay_Jones = AtsUsersClient.getUserFromToken(DemoUsers.Kay_Jones);
+ IAtsUser Kay_Jones = AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Kay_Jones);
Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(Arrays.asList("SAW Code"));
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", aias, false, false, false, null, Kay_Jones, null, null, null);
@@ -86,7 +86,7 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testAssignee_Joe() throws Exception {
- IAtsUser Joe_Smith = AtsUsersClient.getUserFromToken(DemoUsers.Joe_Smith);
+ IAtsUser Joe_Smith = AtsClientService.get().getUserAdmin().getUserFromToken(DemoUsers.Joe_Smith);
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", new ArrayList<IAtsActionableItem>(), false, false, false, null, Joe_Smith, null,
null, null);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java
index 7cbcfddc73..781181655f 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.client.demo.DemoActionableItems;
import org.eclipse.osee.ats.client.demo.DemoArtifactTypes;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.core.client.action.ActionManager;
@@ -29,7 +30,6 @@ import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.client.review.DecisionReviewManager;
import org.eclipse.osee.ats.core.client.team.TeamState;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
import org.eclipse.osee.ats.core.client.workflow.ChangeType;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.util.AtsDeleteManager;
@@ -203,7 +203,7 @@ public class AtsDeleteManagerTest {
private TeamWorkFlowArtifact createAction(TestNames testName, Collection<IAtsActionableItem> actionableItems, SkynetTransaction transaction) throws OseeCoreException {
Date createdDate = new Date();
- IAtsUser createdBy = AtsUsersClient.getUser();
+ IAtsUser createdBy = AtsClientService.get().getUserAdmin().getCurrentUser();
Artifact actionArt =
ActionManager.createAction(null, testName.name(), "Description", ChangeType.Improvement, "2", false, null,
actionableItems, createdDate, createdBy, null, transaction);
@@ -221,7 +221,7 @@ public class AtsDeleteManagerTest {
DecisionReviewArtifact decRev =
DecisionReviewManager.createNewDecisionReview(teamArt, ReviewBlockType.None, testName.name(),
TeamState.Endorse.getName(), "Description", DecisionReviewManager.getDefaultDecisionReviewOptions(),
- Arrays.asList(AtsUsersClient.getUser()), createdDate, createdBy);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), createdDate, createdBy);
decRev.persist(transaction);
return teamArt;
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
index a4882abd8e..e96c9bb63e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
@@ -35,7 +35,7 @@ import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.action.ActionManager;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.client.util.AtsUsersClient;
+
import org.eclipse.osee.ats.core.client.workflow.ChangeType;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
@@ -102,7 +102,7 @@ public class DemoTestUtil {
Artifact actionArt =
ActionManager.createAction(null, title, "Description", ChangeType.Improvement, "2", false, null,
ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName())), new Date(),
- AtsUsersClient.getUser(), null, transaction);
+ AtsClientService.get().getUserAdmin().getCurrentUser(), null, transaction);
TeamWorkFlowArtifact teamArt = null;
for (TeamWorkFlowArtifact team : ActionManager.getTeams(actionArt)) {
@@ -126,7 +126,7 @@ public class DemoTestUtil {
Collection<IAtsTeamDefinition> teamDefs = TeamDefinitions.getImpactedTeamDefs(actionableItems);
ActionManager.createTeamWorkflow(actionArt, teamDefs.iterator().next(), actionableItems,
- Arrays.asList(AtsUsersClient.getUser()), transaction, new Date(), AtsUsersClient.getUser(), null);
+ Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), transaction, new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(), null);
TeamWorkFlowArtifact teamArt = null;
for (TeamWorkFlowArtifact team : ActionManager.getTeams(actionArt)) {
@@ -145,7 +145,7 @@ public class DemoTestUtil {
for (int x = 1; x < numTasks + 1; x++) {
names.add(title + " " + x);
}
- return teamArt.createTasks(names, Arrays.asList(AtsUsersClient.getUser()), new Date(), AtsUsersClient.getUser(),
+ return teamArt.createTasks(names, Arrays.asList(AtsClientService.get().getUserAdmin().getCurrentUser()), new Date(), AtsClientService.get().getUserAdmin().getCurrentUser(),
transaction);
}
@@ -212,7 +212,7 @@ public class DemoTestUtil {
// Confirm user is Joe Smith
assertTrue(
"Authenticated user should be \"Joe Smith\" and is not. Check that Demo Application Server is being run.",
- AtsUsersClient.getUser().getUserId().equals("Joe Smith"));
+ AtsClientService.get().getUserAdmin().getCurrentUser().getUserId().equals("Joe Smith"));
} catch (OseeAuthenticationException ex) {
OseeLog.log(DemoTestUtil.class, Level.SEVERE, ex);
fail("Can't authenticate, either Demo Application Server is not running or Demo DbInit has not been performed");

Back to the top