Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-10-07 17:25:10 +0000
committerRyan D. Brooks2010-10-07 17:25:10 +0000
commitd9d8f5111a8f11eccb5f29054889e95e34ed1d1d (patch)
tree4b1dc2a794f8c2e7a2e6b8e30812b510e9c8dae9 /plugins
parentd100b8fe11551ed3b061ace0ac9cf892b3c879d0 (diff)
downloadorg.eclipse.osee-d9d8f5111a8f11eccb5f29054889e95e34ed1d1d.tar.gz
org.eclipse.osee-d9d8f5111a8f11eccb5f29054889e95e34ed1d1d.tar.xz
org.eclipse.osee-d9d8f5111a8f11eccb5f29054889e95e34ed1d1d.zip
refinement: Fix ConflictTestManager and DataFactory test classes to work with artifact type token changes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/ConflictTestManager.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/mocks/DataFactory.java8
2 files changed, 10 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/ConflictTestManager.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/ConflictTestManager.java
index 6d121fd26bb..bc3cab82526 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/ConflictTestManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/ConflictTestManager.java
@@ -133,20 +133,23 @@ public class ConflictTestManager {
}
protected ArtifactModification(Type itemToChange, Modification modificationToPerform, Object object, String name, Class<?> clas, String value) throws OseeCoreException {
- this(itemToChange, modificationToPerform, -1, null, null, name);
if (!itemToChange.equals(Type.ATTRIBUTE)) {
throw new OseeCoreException("This is the Attribute Constructor");
}
+ this.itemToChange = itemToChange;
+ this.modificationToPerform = modificationToPerform;
this.object = object;
this.clas = clas;
this.value = value;
+ this.name = name;
}
protected ArtifactModification(Type itemToChange, Modification modificationToPerform, Object object, Object object2) throws OseeCoreException {
- this(itemToChange, modificationToPerform, object, null, null, null);
if (!itemToChange.equals(Type.RELATION)) {
throw new OseeCoreException("This is the Relation Constructor");
}
+ this.itemToChange = itemToChange;
+ this.modificationToPerform = modificationToPerform;
this.object = object;
this.object2 = object2;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/mocks/DataFactory.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/mocks/DataFactory.java
index 3b657567bc7..e795222eb6d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/mocks/DataFactory.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/mocks/DataFactory.java
@@ -14,6 +14,8 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Random;
+import org.eclipse.osee.framework.core.data.IArtifactType;
+import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
@@ -36,15 +38,15 @@ public final class DataFactory {
public static IArtifact createArtifact(String name, String guid) throws OseeCoreException {
int uniqueId = randomGenerator.nextInt();
- return createArtifact(uniqueId, name, guid, null, null);
+ return createArtifact(uniqueId, name, guid, null, CoreArtifactTypes.Artifact);
}
- public static IArtifact createArtifact(int uniqueId, String name, String guid, Branch branch, ArtifactType artifactType) throws OseeCoreException {
+ public static IArtifact createArtifact(int uniqueId, String name, String guid, Branch branch, IArtifactType artifactType) throws OseeCoreException {
return new MockIArtifact(uniqueId, name, guid, branch, artifactType);
}
public static IArtifact createArtifact(int uniqueId, String name, String guid, Branch branch) throws OseeCoreException {
- return new MockIArtifact(uniqueId, name, guid, branch, null);
+ return new MockIArtifact(uniqueId, name, guid, branch, CoreArtifactTypes.Artifact);
}
public static RelationLink createRelationLink(int relationId, int artA, int artB, Branch branch, RelationType relationType) {

Back to the top