Search in sources :

Example 1 with PackageDefinition

use of com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition in project hazelcast by hazelcast.

the class PackageDefinitionTest method testBuildDefinition_withUses.

@Test
public void testBuildDefinition_withUses() {
    String definition = new PackageDefinition("packageName", false, null, singleton("myUsage")).buildDefinition(false);
    assertContains(definition, "packageName");
    assertContains(definition, "uses:=\"myUsage\"");
    definition = new PackageDefinition("packageName", false, null, uses).buildDefinition(false);
    assertContains(definition, "packageName");
    assertNotContains(definition, "uses:=");
}
Also used : PackageDefinition(com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 2 with PackageDefinition

use of com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition in project hazelcast by hazelcast.

the class InstructionDefinitionTest method setUp.

@Before
public void setUp() {
    PackageDefinition definition = new PackageDefinition("packageName", true, "version", Collections.<String>emptySet());
    Instruction instruction = mock(Instruction.class);
    instructionDefinition = new InstructionDefinition(definition, instruction);
}
Also used : PackageDefinition(com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition) InstructionDefinition(com.hazelcast.buildutils.HazelcastManifestTransformer.InstructionDefinition) Instruction(aQute.lib.osgi.Instruction) Before(org.junit.Before)

Example 3 with PackageDefinition

use of com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition in project hazelcast by hazelcast.

the class PackageDefinitionTest method setUp.

@Before
public void setUp() {
    packageDefinition = new PackageDefinition("packageName", true, "3.8", uses);
    packageDefinitionSameAttributes = new PackageDefinition("packageName", true, "3.8", uses);
    packageDefinitionOtherResolutionOptional = new PackageDefinition("packageName", false, "3.8", uses);
    packageDefinitionOtherVersion = new PackageDefinition("packageName", true, "3.7", uses);
    packageDefinitionOtherPackageName = new PackageDefinition("otherPackageName", true, "3.8", uses);
}
Also used : PackageDefinition(com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition) Before(org.junit.Before)

Example 4 with PackageDefinition

use of com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition in project hazelcast by hazelcast.

the class PackageDefinitionTest method testBuildDefinition_withResolutionOptional.

@Test
public void testBuildDefinition_withResolutionOptional() {
    String definition = new PackageDefinition("packageName", true, null, uses).buildDefinition(true);
    assertContains(definition, "packageName");
    assertContains(definition, "resolution:=optional");
    definition = new PackageDefinition("packageName", false, null, uses).buildDefinition(true);
    assertContains(definition, "packageName");
    assertNotContains(definition, "resolution:=");
    definition = new PackageDefinition("packageName", true, null, uses).buildDefinition(false);
    assertContains(definition, "packageName");
    assertNotContains(definition, "resolution:=");
}
Also used : PackageDefinition(com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 5 with PackageDefinition

use of com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition in project hazelcast by hazelcast.

the class PackageDefinitionTest method testBuildDefinition_withVersion.

@Test
public void testBuildDefinition_withVersion() {
    String definition = new PackageDefinition("packageName", false, "3.8", uses).buildDefinition(false);
    assertContains(definition, "packageName");
    assertContains(definition, "version=3.8");
    definition = new PackageDefinition("packageName", false, null, uses).buildDefinition(false);
    assertContains(definition, "packageName");
    assertNotContains(definition, "version=");
}
Also used : PackageDefinition(com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

PackageDefinition (com.hazelcast.buildutils.HazelcastManifestTransformer.PackageDefinition)5 ParallelTest (com.hazelcast.test.annotation.ParallelTest)3 QuickTest (com.hazelcast.test.annotation.QuickTest)3 Test (org.junit.Test)3 Before (org.junit.Before)2 Instruction (aQute.lib.osgi.Instruction)1 InstructionDefinition (com.hazelcast.buildutils.HazelcastManifestTransformer.InstructionDefinition)1