Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2015-11-02 12:51:09 -0500
committerRyan D. Brooks2015-11-02 12:51:09 -0500
commitea902f9ebdc30995ba5540661c593a54763ff21b (patch)
treeba3a89142fa0501103acb537980d79b5d0a3f17e /plugins/org.eclipse.osee.ats.core.test
parent1b359266bfc88a18205c58e547eeecacbb64f15e (diff)
downloadorg.eclipse.osee-ea902f9ebdc30995ba5540661c593a54763ff21b.tar.gz
org.eclipse.osee-ea902f9ebdc30995ba5540661c593a54763ff21b.tar.xz
org.eclipse.osee-ea902f9ebdc30995ba5540661c593a54763ff21b.zip
refactor: Standardize ATS client server getArtifact calls
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core.test')
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
index 2fb5a94a603..bbfe1376aa1 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
@@ -85,11 +85,11 @@ public class WorkPackageUtilityTest {
assertResult(result, null, false);
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
- when(services.getArtifactById("guid")).thenReturn(null);
+ when(services.getArtifactByGuid("guid")).thenReturn(null);
result = util.getWorkPackageArtifact(services, teamWf);
assertResult(result, null, false);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
result = util.getWorkPackageArtifact(services, teamWf);
assertResult(result, workPackageArt, false);
@@ -101,11 +101,11 @@ public class WorkPackageUtilityTest {
@org.junit.Test
public void testGetInsertionActivity() throws Exception {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
- when(services.getArtifactById("guid")).thenReturn(null);
+ when(services.getArtifactByGuid("guid")).thenReturn(null);
Pair<IAtsInsertionActivity, Boolean> result = util.getInsertionActivity(services, teamWf);
assertResult(result, null, false);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(null);
result = util.getInsertionActivity(services, teamWf);
@@ -127,7 +127,7 @@ public class WorkPackageUtilityTest {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(null);
Pair<IAtsInsertion, Boolean> result = util.getInsertion(services, teamWf);
@@ -149,8 +149,7 @@ public class WorkPackageUtilityTest {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
- when(factory.getInsertionActivity(activityArt)).thenReturn(null);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(activity);
when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion,
IAtsInsertion.class)).thenReturn(insertion);
@@ -173,7 +172,7 @@ public class WorkPackageUtilityTest {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(null);
when(factory.getInsertionActivity(activityArt)).thenReturn(activity);
when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion,

Back to the top