/*
 * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.osgi.test.cases.subsystem.junit;

import org.osgi.service.subsystem.Subsystem;

public class ExplicitResourceSubsystemTests extends SubsystemTest{

	public void test6A1_applications() {
		doTest6A1(SUBSYSTEM_6_EMPTY_APPLICATION_A, SUBSYSTEM_6_EMPTY_APPLICATION_B);
	}

	public void test6A1_composites() {
		doTest6A1(SUBSYSTEM_6_EMPTY_COMPOSITE_A, SUBSYSTEM_6_EMPTY_COMPOSITE_B);
	}

	private void doTest6A1(String s1Name, String s2Name) {
		Subsystem root = getRootSubsystem();
		Subsystem s1 = doSubsystemInstall(getName() + ":s1", root, "s1", s1Name, false);
		Subsystem s2 = doSubsystemInstall(getName() + ":s2", root, "s2", s2Name, false);

		doSubsystemOperation(getName() + ":s1", s1, Operation.START, false);
		doSubsystemOperation(getName() + ":s2", s2, Operation.START, false);

		doBundleInstall(getName() + ":s1", s1.getBundleContext(), "X", BUNDLE_NO_DEPS_A_V1, false);
		doBundleInstall(getName() + ":s2", s2.getBundleContext(), "X", BUNDLE_NO_DEPS_A_V1, true);
	}

}

@@ -1612,10 +1612,841 @@
 e);%0A%09%7D%0A%0A
+%09public void test6A2_applications() %7B%0A%09%09doTest6A2(SUBSYSTEM_6_EMPTY_APPLICATION_A, SUBSYSTEM_6_EMPTY_APPLICATION_B);%0A%09%7D%0A%0A%09public void test6A2_composites() %7B%0A%09%09doTest6A2(SUBSYSTEM_6_EMPTY_COMPOSITE_A, SUBSYSTEM_6_EMPTY_COMPOSITE_B);%0A%09%7D%0A%09private void doTest6A2(String s1Name, String s2Name) %7B%0A%09%09Subsystem root = getRootSubsystem();%0A%09%09Subsystem s1 = doSubsystemInstall(getName() + %22:s1%22, root, %22s1%22, s1Name, false);%0A%09%09Subsystem s2 = doSubsystemInstall(getName() + %22:s2%22, root, %22s2%22, s2Name, false);%0A%0A%09%09doSubsystemOperation(getName() + %22:s1%22, s1, Operation.START, false);%0A%09%09doSubsystemOperation(getName() + %22:s2%22, s2, Operation.START, false);%0A%0A%09%09doBundleInstall(getName() + %22:s1%22, s1.getBundleContext(), %22X%22, BUNDLE_NO_DEPS_A_V1, false);%0A%09%09doBundleInstall(getName() + %22:s2%22, s2.getBundleContext(), %22Y%22, BUNDLE_NO_DEPS_A_V1, false);%0A%09%7D%0A
 %7D%0A

Add test plan item 6A2