diff options
author | jmisinco | 2011-08-30 18:05:17 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2011-08-30 18:05:17 +0000 |
commit | b3a73c6915c8e1f820bd6ef567e374041eff996e (patch) | |
tree | 3eb52a27e06d409e385751da51d8b1228f9e8acb /plugins/org.eclipse.osee.framework.core.dsl.integration.test | |
parent | 16a75dbee850b5b98d29aa6bfaeb8c590659b4a8 (diff) | |
download | org.eclipse.osee-b3a73c6915c8e1f820bd6ef567e374041eff996e.tar.gz org.eclipse.osee-b3a73c6915c8e1f820bd6ef567e374041eff996e.tar.xz org.eclipse.osee-b3a73c6915c8e1f820bd6ef567e374041eff996e.zip |
feature[ats_M1Y56]: Type types use Long for guid
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.dsl.integration.test')
5 files changed, 43 insertions, 30 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java index bacdef58500..f6f605927fb 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java @@ -259,11 +259,6 @@ public class ArtifactMatchInterpreterTest { return new ArtifactProxy() { @Override - public boolean matches(Identity... identities) { - return false; - } - - @Override public String getUnqualifiedName() { return null; } @@ -313,6 +308,11 @@ public class ArtifactMatchInterpreterTest { return null; } + @Override + public boolean matches(Identity<?>... identities) { + return false; + } + }; } } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java index 328082eb13e..e40a981fc0f 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java @@ -42,13 +42,14 @@ public class ArtifactTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessDataNotMatchesRestriction() throws OseeCoreException { IArtifactType artifactType = CoreArtifactTypes.Requirement; - XArtifactType artifactTypeRef = MockModel.createXArtifactType(artifactType.getGuid(), artifactType.getName()); + XArtifactType artifactTypeRef = + MockModel.createXArtifactType(String.valueOf(artifactType.getGuid()), artifactType.getName()); ArtifactTypeRestriction restriction = MockModel.createArtifactTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); restriction.setArtifactTypeRef(artifactTypeRef); - ArtifactType artifactType2 = new ArtifactType(GUID.create(), "Some Artifact Type", false); + ArtifactType artifactType2 = new ArtifactType(0L, "Some Artifact Type", false); MockArtifactProxy artData = new MockArtifactProxy(GUID.create(), artifactType2); Scope expectedScope = new Scope().add("fail"); DslAsserts.assertNullAccessDetail(getRestrictionHandler(), restriction, artData, expectedScope); @@ -57,7 +58,8 @@ public class ArtifactTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessCreateAccessDetail() throws OseeCoreException { IArtifactType artifactType = CoreArtifactTypes.Requirement; - XArtifactType artifactTypeRef = MockModel.createXArtifactType(artifactType.getGuid(), artifactType.getName()); + XArtifactType artifactTypeRef = + MockModel.createXArtifactType(String.valueOf(artifactType.getGuid()), artifactType.getName()); ArtifactTypeRestriction restriction = MockModel.createArtifactTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -74,7 +76,8 @@ public class ArtifactTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessArtifactTypeInheritance() throws OseeCoreException { IArtifactType artifactType = CoreArtifactTypes.Artifact; - XArtifactType artifactTypeRef = MockModel.createXArtifactType(artifactType.getGuid(), artifactType.getName()); + XArtifactType artifactTypeRef = + MockModel.createXArtifactType(String.valueOf(artifactType.getGuid()), artifactType.getName()); ArtifactTypeRestriction restriction = MockModel.createArtifactTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java index b68cb862eae..59086d22366 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java @@ -50,7 +50,7 @@ public class AttributeTypeRestrictionHandlerTest extends BaseRestrictionHandlerT IAttributeType attributeType = CoreAttributeTypes.Name; XAttributeType attributeTypeRef = - MockModel.createXAttributeType(attributeType.getGuid(), attributeType.getName()); + MockModel.createXAttributeType(String.valueOf(attributeType.getGuid()), attributeType.getName()); AttributeTypeRestriction restriction = MockModel.createAttributeTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -68,7 +68,7 @@ public class AttributeTypeRestrictionHandlerTest extends BaseRestrictionHandlerT IAttributeType attributeType = CoreAttributeTypes.Name; XAttributeType attributeTypeRef = - MockModel.createXAttributeType(attributeType.getGuid(), attributeType.getName()); + MockModel.createXAttributeType(String.valueOf(attributeType.getGuid()), attributeType.getName()); AttributeTypeRestriction restriction = MockModel.createAttributeTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -87,14 +87,15 @@ public class AttributeTypeRestrictionHandlerTest extends BaseRestrictionHandlerT IAttributeType attributeType = CoreAttributeTypes.Name; XAttributeType attributeTypeRef = - MockModel.createXAttributeType(attributeType.getGuid(), attributeType.getName()); + MockModel.createXAttributeType(String.valueOf(attributeType.getGuid()), attributeType.getName()); AttributeTypeRestriction restriction = MockModel.createAttributeTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); restriction.setAttributeTypeRef(attributeTypeRef); IArtifactType artifactType = CoreArtifactTypes.Artifact; - XArtifactType artifactTypeRef = MockModel.createXArtifactType(artifactType.getGuid(), artifactType.getName()); + XArtifactType artifactTypeRef = + MockModel.createXArtifactType(String.valueOf(artifactType.getGuid()), artifactType.getName()); restriction.setArtifactTypeRef(artifactTypeRef); IArtifactType artifactType2 = CoreArtifactTypes.Requirement; @@ -113,14 +114,15 @@ public class AttributeTypeRestrictionHandlerTest extends BaseRestrictionHandlerT IAttributeType attributeType = CoreAttributeTypes.Name; XAttributeType attributeTypeRef = - MockModel.createXAttributeType(attributeType.getGuid(), attributeType.getName()); + MockModel.createXAttributeType(String.valueOf(attributeType.getGuid()), attributeType.getName()); AttributeTypeRestriction restriction = MockModel.createAttributeTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); restriction.setAttributeTypeRef(attributeTypeRef); IArtifactType artifactType = CoreArtifactTypes.Requirement; - XArtifactType artifactTypeRef = MockModel.createXArtifactType(artifactType.getGuid(), artifactType.getName()); + XArtifactType artifactTypeRef = + MockModel.createXArtifactType(String.valueOf(artifactType.getGuid()), artifactType.getName()); restriction.setArtifactTypeRef(artifactTypeRef); ArtifactType artArtifactType = new ArtifactType(artifactType.getGuid(), artifactType.getName(), false); @@ -139,14 +141,15 @@ public class AttributeTypeRestrictionHandlerTest extends BaseRestrictionHandlerT IAttributeType attributeType = CoreAttributeTypes.Name; XAttributeType attributeTypeRef = - MockModel.createXAttributeType(attributeType.getGuid(), attributeType.getName()); + MockModel.createXAttributeType(String.valueOf(attributeType.getGuid()), attributeType.getName()); AttributeTypeRestriction restriction = MockModel.createAttributeTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); restriction.setAttributeTypeRef(attributeTypeRef); IArtifactType artifactType = CoreArtifactTypes.Artifact; - XArtifactType artifactTypeRef = MockModel.createXArtifactType(artifactType.getGuid(), artifactType.getName()); + XArtifactType artifactTypeRef = + MockModel.createXArtifactType(String.valueOf(artifactType.getGuid()), artifactType.getName()); restriction.setArtifactTypeRef(artifactTypeRef); IArtifactType artifactType2 = CoreArtifactTypes.Requirement; diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java index 73997d9a16b..f1e2e004260 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java @@ -59,7 +59,8 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessDataRelationTypeNoMatch() throws OseeCoreException { IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child; - XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName()); + XRelationType relationTypeRef = + MockModel.createXRelationType(String.valueOf(relationType.getGuid()), relationType.getName()); RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -74,7 +75,8 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessDataRelationTypeMatchSideANoMatch() throws OseeCoreException { IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child; - XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName()); + XRelationType relationTypeRef = + MockModel.createXRelationType(String.valueOf(relationType.getGuid()), relationType.getName()); RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -98,7 +100,8 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessDataRelationTypeMatchSideAMatch() throws OseeCoreException { IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child; - XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName()); + XRelationType relationTypeRef = + MockModel.createXRelationType(String.valueOf(relationType.getGuid()), relationType.getName()); RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -125,7 +128,8 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessDataRelationTypeMatchSideBNoMatch() throws OseeCoreException { IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child; - XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName()); + XRelationType relationTypeRef = + MockModel.createXRelationType(String.valueOf(relationType.getGuid()), relationType.getName()); RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -150,7 +154,8 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessDataRelationTypeMatchSideBMatch() throws OseeCoreException { IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child; - XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName()); + XRelationType relationTypeRef = + MockModel.createXRelationType(String.valueOf(relationType.getGuid()), relationType.getName()); RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -177,7 +182,8 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe @Test public void testProcessDataRelationTypeMatchBothMatch() throws OseeCoreException { IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child; - XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName()); + XRelationType relationTypeRef = + MockModel.createXRelationType(String.valueOf(relationType.getGuid()), relationType.getName()); RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); @@ -222,7 +228,8 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe private void testProcessRelationWithArtifactHelper(String artifactName, String matcherArtifactName, Scope expectedScope) throws OseeCoreException { IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child; - XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName()); + XRelationType relationTypeRef = + MockModel.createXRelationType(String.valueOf(relationType.getGuid()), relationType.getName()); RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction(); restriction.setPermission(AccessPermissionEnum.ALLOW); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeUtilTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeUtilTest.java index a8149dd1329..07f79181aa4 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeUtilTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeUtilTest.java @@ -78,7 +78,7 @@ public class OseeUtilTest { } @Test - public void testToTokenArtifactType() { + public void testToTokenArtifactType() throws OseeCoreException { XArtifactType type = OseeDslFactory.eINSTANCE.createXArtifactType(); IArtifactType expected = CoreArtifactTypes.GlobalPreferences; @@ -93,7 +93,7 @@ public class OseeUtilTest { } @Test - public void testToTokenAttributeType() { + public void testToTokenAttributeType() throws OseeCoreException { XAttributeType type = OseeDslFactory.eINSTANCE.createXAttributeType(); IAttributeType expected = CoreAttributeTypes.Description; @@ -108,7 +108,7 @@ public class OseeUtilTest { } @Test - public void testToTokenRelationType() { + public void testToTokenRelationType() throws OseeCoreException { XRelationType type = OseeDslFactory.eINSTANCE.createXRelationType(); IRelationType expected = CoreRelationTypes.Allocation__Component; @@ -180,11 +180,11 @@ public class OseeUtilTest { } } - private static void setupToToken(OseeType typeToCheck, Identity<String> expected) { + private static void setupToToken(OseeType typeToCheck, Identity<Long> expected) { String name = "bogus name"; // This should not affect equality - String guid = expected.getGuid(); + Long guid = expected.getGuid(); typeToCheck.setName(name); - typeToCheck.setTypeGuid(guid); + typeToCheck.setUuid(String.valueOf(guid)); Assert.assertEquals(name, typeToCheck.getName()); Assert.assertEquals(guid, typeToCheck.getTypeGuid()); |