Search in sources :

Example 26 with StateObjectFactory

use of org.eclipse.osgi.service.resolver.StateObjectFactory in project rt.equinox.framework by eclipse.

the class TestDynamic_002 method testTest_002.

public void testTest_002() {
    State state = buildEmptyState();
    StateObjectFactory sof = StateObjectFactory.defaultFactory;
    bundle_1 = create_bundle_1(sof);
    bundle_2 = create_bundle_2(sof);
    bundle_3 = create_bundle_3(sof);
    // ***************************************************
    // stage a
    // expect to pass =true
    // ***************************************************
    addBundlesToState_a(state);
    // ***************************************************
    try {
        state.resolve();
    } catch (Throwable t) {
        fail("unexpected exception class=" + t.getClass().getName() + " message=" + t.getMessage());
        return;
    }
    checkBundlesResolved_a();
    checkWiring_a();
    // Dynamics
    ExportPackageDescription exp = state.linkDynamicImport(bundle_1, "r");
    assertNull("Package [r] is wired when it should not be ", exp);
}
Also used : State(org.eclipse.osgi.service.resolver.State) ExportPackageDescription(org.eclipse.osgi.service.resolver.ExportPackageDescription) StateObjectFactory(org.eclipse.osgi.service.resolver.StateObjectFactory)

Example 27 with StateObjectFactory

use of org.eclipse.osgi.service.resolver.StateObjectFactory in project rt.equinox.framework by eclipse.

the class TestVersion_001 method testTest_001.

public void testTest_001() {
    State state = buildEmptyState();
    StateObjectFactory sof = StateObjectFactory.defaultFactory;
    bundle_1 = create_bundle_1(sof);
    bundle_2 = create_bundle_2(sof);
    bundle_3 = create_bundle_3(sof);
    // ***************************************************
    // stage a
    // expect to pass =true
    // ***************************************************
    addBundlesToState_a(state);
    // ***************************************************
    try {
        state.resolve();
    } catch (Throwable t) {
        fail("unexpected exception class=" + t.getClass().getName() + " message=" + t.getMessage());
        return;
    }
    checkBundlesResolved_a();
    checkWiring_a();
}
Also used : State(org.eclipse.osgi.service.resolver.State) StateObjectFactory(org.eclipse.osgi.service.resolver.StateObjectFactory)

Example 28 with StateObjectFactory

use of org.eclipse.osgi.service.resolver.StateObjectFactory in project rt.equinox.framework by eclipse.

the class TestVersion_003 method testTest_003.

public void testTest_003() {
    State state = buildEmptyState();
    StateObjectFactory sof = StateObjectFactory.defaultFactory;
    bundle_1 = create_bundle_1(sof);
    bundle_2 = create_bundle_2(sof);
    bundle_3 = create_bundle_3(sof);
    // ***************************************************
    // stage a
    // expect to pass =true
    // ***************************************************
    addBundlesToState_a(state);
    // ***************************************************
    try {
        state.resolve();
    } catch (Throwable t) {
        fail("unexpected exception class=" + t.getClass().getName() + " message=" + t.getMessage());
        return;
    }
    checkBundlesResolved_a();
    checkWiring_a();
}
Also used : State(org.eclipse.osgi.service.resolver.State) StateObjectFactory(org.eclipse.osgi.service.resolver.StateObjectFactory)

Aggregations

StateObjectFactory (org.eclipse.osgi.service.resolver.StateObjectFactory)28 State (org.eclipse.osgi.service.resolver.State)27 ExportPackageDescription (org.eclipse.osgi.service.resolver.ExportPackageDescription)6 ArrayList (java.util.ArrayList)1 Hashtable (java.util.Hashtable)1 IPublisherAction (org.eclipse.equinox.p2.publisher.IPublisherAction)1 IPublisherInfo (org.eclipse.equinox.p2.publisher.IPublisherInfo)1 BundlesAction (org.eclipse.equinox.p2.publisher.eclipse.BundlesAction)1 BundleDescription (org.eclipse.osgi.service.resolver.BundleDescription)1 BundleException (org.osgi.framework.BundleException)1