diff --git a/tests/org.eclipse.passage.lic.api.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.passage.lic.api.tests/META-INF/MANIFEST.MF index 11ae11e64..3d5d0e591 100644 --- a/tests/org.eclipse.passage.lic.api.tests/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.passage.lic.api.tests/META-INF/MANIFEST.MF @@ -9,6 +9,6 @@ Bundle-Copyright: %Bundle-Copyright Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.junit;bundle-version="4.12.0", org.eclipse.passage.lic.api;bundle-version="0.7.0" -Export-Package: org.eclipse.passage.lic.api.conditions.tests;x-internal:=true, - org.eclipse.passage.lic.api.tests;x-internal:=true, - org.eclipse.passage.lic.api.version.tests;x-internal:=true +Export-Package: org.eclipse.passage.lic.api.tests;x-internal:=true, + org.eclipse.passage.lic.api.tests.conditions;x-internal:=true, + org.eclipse.passage.lic.api.tests.version;x-internal:=true diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/EvaluationTypeContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/EvaluationTypeContractTest.java similarity index 95% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/EvaluationTypeContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/EvaluationTypeContractTest.java index eadc779b5..a10b6eb09 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/EvaluationTypeContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/EvaluationTypeContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.conditions.tests; +package org.eclipse.passage.lic.api.tests.conditions; import static org.junit.Assert.assertEquals; diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/EvaluationTypeOfContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/EvaluationTypeOfContractTest.java similarity index 93% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/EvaluationTypeOfContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/EvaluationTypeOfContractTest.java index 980f28afc..1ad69e278 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/EvaluationTypeOfContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/EvaluationTypeOfContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.conditions.tests; +package org.eclipse.passage.lic.api.tests.conditions; import org.eclipse.passage.lic.internal.api.conditions.EvaluationType; diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/MatchingRuleContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/MatchingRuleContractTest.java similarity index 97% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/MatchingRuleContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/MatchingRuleContractTest.java index 6512c69b1..e7c87d791 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/MatchingRuleContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/MatchingRuleContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.conditions.tests; +package org.eclipse.passage.lic.api.tests.conditions; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodClosedContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodClosedContractTest.java similarity index 97% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodClosedContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodClosedContractTest.java index 2091e0d67..f19d55e83 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodClosedContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodClosedContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.conditions.tests; +package org.eclipse.passage.lic.api.tests.conditions; import static org.junit.Assert.assertTrue; diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodContractTest.java similarity index 95% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodContractTest.java index 0aef11e03..ab5b06526 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.conditions.tests; +package org.eclipse.passage.lic.api.tests.conditions; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodOpenContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodOpenContractTest.java similarity index 97% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodOpenContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodOpenContractTest.java index c692988a8..d23c5251d 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/conditions/tests/ValidityPeriodOpenContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/conditions/ValidityPeriodOpenContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.conditions.tests; +package org.eclipse.passage.lic.api.tests.conditions; import static org.junit.Assert.assertEquals; diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/version/tests/SemanticVersionContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/version/SemanticVersionContractTest.java similarity index 96% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/version/tests/SemanticVersionContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/version/SemanticVersionContractTest.java index 78153b379..61eef4188 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/version/tests/SemanticVersionContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/version/SemanticVersionContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.version.tests; +package org.eclipse.passage.lic.api.tests.version; import static org.junit.Assert.assertNotNull; import static org.junit.Assume.assumeFalse; diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/version/tests/VersionContractTest.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/version/VersionContractTest.java similarity index 95% rename from tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/version/tests/VersionContractTest.java rename to tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/version/VersionContractTest.java index 58f566629..7d210efed 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/version/tests/VersionContractTest.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/version/VersionContractTest.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.api.version.tests; +package org.eclipse.passage.lic.api.tests.version; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/BaseConditionTest.java b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/BaseConditionTest.java index 30f5c5a98..a4c370a82 100644 --- a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/BaseConditionTest.java +++ b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/BaseConditionTest.java @@ -12,8 +12,12 @@ *******************************************************************************/ package org.eclipse.passage.lic.internal.base.conditions; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import java.util.Date; +import org.eclipse.passage.lic.internal.api.conditions.Condition; import org.eclipse.passage.lic.internal.api.conditions.EvaluationInstructions; import org.eclipse.passage.lic.internal.api.conditions.EvaluationType; import org.eclipse.passage.lic.internal.api.conditions.ValidityPeriod; @@ -59,6 +63,21 @@ public void evaluationInstructionsAreMandatory() { new BaseCondition(feature(), versionMatch(), validityPeriod(), null); } + @Test + public void isDataTransitionObject() { + // given + VersionMatch match = versionMatch(); + ValidityPeriod period = validityPeriod(); + EvaluationInstructions instructions = evaluationInstructions(); + // when + Condition condition = new BaseCondition(feature(), match, period, instructions); + // then + assertEquals(feature(), condition.feature()); + assertTrue(match == condition.versionMatch()); + assertTrue(period == condition.validityPeriod()); + assertTrue(instructions == condition.evaluationInstructions()); + } + private String feature() { return "test-feature"; //$NON-NLS-1$ } diff --git a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseMatchingRuleContractTest.java b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseMatchingRuleContractTest.java index 0f4bb7115..82819907f 100644 --- a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseMatchingRuleContractTest.java +++ b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseMatchingRuleContractTest.java @@ -12,7 +12,7 @@ *******************************************************************************/ package org.eclipse.passage.lic.internal.base.conditions.contract; -import org.eclipse.passage.lic.api.conditions.tests.MatchingRuleContractTest; +import org.eclipse.passage.lic.api.tests.conditions.MatchingRuleContractTest; import org.junit.Test; @SuppressWarnings("restriction") diff --git a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseValidityPeriodContractTest.java b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseValidityPeriodContractTest.java index 20ed02d83..73fbd9b5a 100644 --- a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseValidityPeriodContractTest.java +++ b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/conditions/contract/BaseValidityPeriodContractTest.java @@ -14,7 +14,7 @@ import java.util.Date; -import org.eclipse.passage.lic.api.conditions.tests.ValidityPeriodClosedContractTest; +import org.eclipse.passage.lic.api.tests.conditions.ValidityPeriodClosedContractTest; import org.eclipse.passage.lic.internal.api.conditions.ValidityPeriodClosed; import org.eclipse.passage.lic.internal.base.conditions.BaseValidityPeriodClosed; diff --git a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/BaseSemanticVersionContractTest.java b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/BaseSemanticVersionContractTest.java index 256814a7f..25f532c8f 100644 --- a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/BaseSemanticVersionContractTest.java +++ b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/BaseSemanticVersionContractTest.java @@ -12,7 +12,7 @@ *******************************************************************************/ package org.eclipse.passage.lic.internal.base.tests.version.contract; -import org.eclipse.passage.lic.api.version.tests.SemanticVersionContractTest; +import org.eclipse.passage.lic.api.tests.version.SemanticVersionContractTest; import org.eclipse.passage.lic.internal.api.version.SemanticVersion; import org.eclipse.passage.lic.internal.base.version.BaseSemanticVersion; diff --git a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/SafeVersionContractTest.java b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/SafeVersionContractTest.java index 68d4a6754..060e480dd 100644 --- a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/SafeVersionContractTest.java +++ b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/version/contract/SafeVersionContractTest.java @@ -12,7 +12,7 @@ *******************************************************************************/ package org.eclipse.passage.lic.internal.base.tests.version.contract; -import org.eclipse.passage.lic.api.version.tests.VersionContractTest; +import org.eclipse.passage.lic.api.tests.version.VersionContractTest; import org.eclipse.passage.lic.internal.api.version.Version; import org.eclipse.passage.lic.internal.base.version.SafeVersion;