use of org.eclipse.osgi.service.resolver.State in project rt.equinox.framework by eclipse.
the class TestRFC79_004 method testTest_004.
public void testTest_004() {
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);
bundle_4 = create_bundle_4(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();
}
use of org.eclipse.osgi.service.resolver.State in project rt.equinox.framework by eclipse.
the class NewResolverTest method testSkeleton.
public void testSkeleton() {
State state = buildEmptyState();
state.resolve();
}
use of org.eclipse.osgi.service.resolver.State in project rt.equinox.framework by eclipse.
the class StateUsesPerformanceTest method doUsesResolution.
private void doUsesResolution(int stateSize, int repetitions, String localName, String degradation) throws BundleException {
final State originalState = buildRandomState(stateSize);
addUsesBundles(originalState);
PerformanceTestRunner runner = new PerformanceTestRunner() {
protected void test() {
originalState.resolve(false);
}
};
runner.setRegressionReason(degradation);
runner.run(this, localName, 10, repetitions);
}
use of org.eclipse.osgi.service.resolver.State in project rt.equinox.framework by eclipse.
the class TestDynamic_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);
// ***************************************************
// 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, "p");
assertNotNull("Package [p] is not wired when it should be ", exp);
assertEquals("Package [p] is wired incorrectly ", exp.getExporter(), bundle_2);
}
use of org.eclipse.osgi.service.resolver.State in project rt.equinox.framework by eclipse.
the class TestOptional_001 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();
}
Aggregations