1 /******************************************************************************* 2 * Copyright (c) 2007, 2017 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 * Red Hat, Inc. - fragment support 14 *******************************************************************************/ 15 package org.eclipse.equinox.p2.tests.simpleconfigurator; 16 17 import java.io.File; 18 import org.eclipse.equinox.p2.tests.TestData; 19 import org.osgi.framework.BundleContext; 20 21 public class BundlesTxtTest extends AbstractSimpleConfiguratorTest { 22 23 { 24 BUNDLE_JAR_DIRECTORY = "simpleConfiguratorTest/bundlesTxt"; 25 } 26 27 protected File[] jars = null; 28 protected File bundleInfo = null; 29 30 @Override setUp()31 protected void setUp() throws Exception { 32 super.setUp(); 33 34 jars = getBundleJars(TestData.getFile(BUNDLE_JAR_DIRECTORY, "")); 35 // Create a bundles.info containing all the jars passed 36 bundleInfo = createBundlesTxt(jars); 37 } 38 testBundlesTxt()39 public void testBundlesTxt() throws Exception { 40 BundleContext equinoxContext = startFramework(bundleInfo, null); 41 assertJarsInstalled(jars, equinoxContext.getBundles()); 42 assertEquals(jars.length + 2, equinoxContext.getBundles().length); 43 } 44 } 45