Skip to content

Commit

Permalink
Merge pull request #258 from eclipse-passage/564420
Browse files Browse the repository at this point in the history
Bug 564420 move HC condition miner to new interfaces
  • Loading branch information
eparovyshnaya authored Jun 21, 2020
2 parents 68ea240 + 9d04b5c commit cce89c9
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 15 deletions.
6 changes: 3 additions & 3 deletions tests/org.eclipse.passage.lic.api.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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$
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cce89c9

Please sign in to comment.