Replaces code using default encoding with code using explicitly UTF-8
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java
index 8565e3b..a217a56 100644
--- a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java
+++ b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java
@@ -68,7 +68,7 @@
@Test
public void testFictionalURI() {
- File file = new File("/foo/bar.jar");
+ File file = new File("foo/bar.jar");
try {
BUNDLE_BRIDGE.generateArtifactDescriptor(file);
assertTrue("Should throw exception", false);
diff --git a/org.eclipse.virgo.shell.command/src/test/java/org/eclipse/virgo/shell/osgicommand/internal/GogoClassLoadingCommandTests.java b/org.eclipse.virgo.shell.command/src/test/java/org/eclipse/virgo/shell/osgicommand/internal/GogoClassLoadingCommandTests.java
index 23aa300..fec7c2b 100755
--- a/org.eclipse.virgo.shell.command/src/test/java/org/eclipse/virgo/shell/osgicommand/internal/GogoClassLoadingCommandTests.java
+++ b/org.eclipse.virgo.shell.command/src/test/java/org/eclipse/virgo/shell/osgicommand/internal/GogoClassLoadingCommandTests.java
@@ -8,13 +8,27 @@
* Contributors:
* Hristo Iliev, SAP AG - initial contribution
******************************************************************************/
+
package org.eclipse.virgo.shell.osgicommand.internal;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URL;
+import java.util.Enumeration;
+
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.osgi.service.resolver.ExportPackageDescription;
import org.eclipse.osgi.service.resolver.PlatformAdmin;
import org.eclipse.osgi.service.resolver.State;
-import org.eclipse.virgo.shell.osgicommand.internal.GogoClassLoadingCommand;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -23,15 +37,6 @@
import org.osgi.framework.ServiceReference;
import org.osgi.service.packageadmin.PackageAdmin;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.net.URL;
-import java.util.Enumeration;
-
-import static org.easymock.EasyMock.*;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
/**
* Unit tests for class loading commands
*/
@@ -39,32 +44,39 @@
public class GogoClassLoadingCommandTests {
private static final long BUNDLE_ID = 1234;
+
private static final String BUNDLE_SYMBOLIC_NAME = "test";
private static final String CLASS_NAME = GogoClassLoadingCommandTests.class.getName();
+
private static final String CLASS_PACKAGE = GogoClassLoadingCommandTests.class.getPackage().getName();
private static final String SHORT_CLASS_NAME = CLASS_NAME.substring(CLASS_NAME.lastIndexOf(".") + 1) + ".class";
+
private static final String CLASS_NAME_PATH = CLASS_NAME.replace(".", "/") + ".class";
+
private static final String CLASS_PACKAGE_PATH = CLASS_PACKAGE.replace(".", "/");
+
private ByteArrayOutputStream baos;
+
private PrintStream oldOut;
+
private PrintStream output;
-
+
@Before
- public void before() {
+ public void before() throws UnsupportedEncodingException {
this.oldOut = System.out;
this.baos = new ByteArrayOutputStream();
- this.output = new PrintStream(baos);
+ this.output = new PrintStream(baos, true, UTF_8.name());
System.setOut(this.output);
}
-
+
private String getOutput() {
this.output.flush();
- String output = new String(baos.toByteArray());
+ String output = new String(baos.toByteArray(), UTF_8);
return output;
}
-
+
@After
public void after() {
System.setOut(this.oldOut);
@@ -80,7 +92,7 @@
expect(bundle.findEntries("/", CLASS_NAME_PATH, true)).andReturn(null); // class not found in root
expect(bundle.getBundleId()).andReturn(BUNDLE_ID);
expect(bundle.getSymbolicName()).andReturn(BUNDLE_SYMBOLIC_NAME);
- expect(bundleContext.getBundles()).andReturn(new Bundle[]{bundle});
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { bundle });
replay(bundle, bundleContext);
@@ -88,17 +100,15 @@
command.clhas(CLASS_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME_PATH));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME_PATH));
assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE_PATH + "]",
- output.contains("" + CLASS_PACKAGE_PATH));
- assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ output.contains("" + CLASS_PACKAGE_PATH));
+ assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertTrue("Command output [" + output + "] does not contain bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
verify(bundle, bundleContext);
-
+
}
@Test
@@ -108,7 +118,7 @@
expect(bundle.findEntries("/", SHORT_CLASS_NAME, true)).andReturn(null); // class does not exist
expect(bundle.findEntries("/", CLASS_NAME_PATH, true)).andReturn(null); // class does not exist
- expect(bundleContext.getBundles()).andReturn(new Bundle[]{bundle});
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { bundle });
replay(bundle, bundleContext);
@@ -116,14 +126,11 @@
command.clhas(CLASS_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME_PATH));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE_PATH));
- assertFalse("Command output [" + output + "] contains bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME_PATH));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE_PATH));
+ assertFalse("Command output [" + output + "] contains bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertFalse("Command output [" + output + "] contains bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
verify(bundle, bundleContext);
}
@@ -134,10 +141,10 @@
Bundle bundle = createMock(Bundle.class);
BundleContext bundleContext = createMock(BundleContext.class);
- expect((Class)bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
+ expect((Class) bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
expect(bundle.getBundleId()).andReturn(BUNDLE_ID);
expect(bundle.getSymbolicName()).andReturn(BUNDLE_SYMBOLIC_NAME);
- expect(bundleContext.getBundles()).andReturn(new Bundle[]{bundle});
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { bundle });
expect(bundleContext.getBundle(0)).andReturn(bundle); // system bundle is also our mockup
replay(bundle, bundleContext);
@@ -146,14 +153,11 @@
command.clload(CLASS_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertTrue("Command output [" + output + "] does not contain bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
verify(bundle, bundleContext);
}
@@ -164,7 +168,7 @@
BundleContext bundleContext = createMock(BundleContext.class);
expect(bundle.loadClass(CLASS_NAME)).andReturn(null);
- expect(bundleContext.getBundles()).andReturn(new Bundle[]{bundle});
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { bundle });
replay(bundle, bundleContext);
@@ -172,14 +176,11 @@
command.clload(CLASS_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertFalse("Command output [" + output + "] contains bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertFalse("Command output [" + output + "] contains bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertFalse("Command output [" + output + "] contains bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
verify(bundle, bundleContext);
}
@@ -192,13 +193,13 @@
PackageAdmin packageAdmin = createMock(PackageAdmin.class);
ServiceReference packageAdminServiceReference = createMock(ServiceReference.class);
- expect((Class)bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
+ expect((Class) bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
expect(bundle.getBundleId()).andReturn(BUNDLE_ID);
expect(bundle.getSymbolicName()).andReturn(BUNDLE_SYMBOLIC_NAME);
expect(bundleContext.getBundle(0)).andReturn(bundle); // system bundle is also our mockup
expect(bundleContext.getServiceReference(PackageAdmin.class)).andReturn(packageAdminServiceReference);
expect(bundleContext.getService(packageAdminServiceReference)).andReturn(packageAdmin);
- expect(packageAdmin.getBundles(BUNDLE_SYMBOLIC_NAME, null)).andReturn(new Bundle[]{bundle});
+ expect(packageAdmin.getBundles(BUNDLE_SYMBOLIC_NAME, null)).andReturn(new Bundle[] { bundle });
replay(bundle, bundleContext, packageAdmin, packageAdminServiceReference);
@@ -206,14 +207,11 @@
command.clload(CLASS_NAME, BUNDLE_SYMBOLIC_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertTrue("Command output [" + output + "] does not contain bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
verify(bundle, bundleContext, packageAdmin, packageAdminServiceReference);
}
@@ -224,7 +222,7 @@
Bundle bundle = createMock(Bundle.class);
BundleContext bundleContext = createMock(BundleContext.class);
- expect((Class)bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
+ expect((Class) bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
expect(bundle.getBundleId()).andReturn(BUNDLE_ID);
expect(bundle.getSymbolicName()).andReturn(BUNDLE_SYMBOLIC_NAME);
expect(bundleContext.getBundle(0)).andReturn(bundle); // system bundle is also our mockup
@@ -236,14 +234,11 @@
command.clload(CLASS_NAME, BUNDLE_ID);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertTrue("Command output [" + output + "] does not contain bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
verify(bundle, bundleContext);
}
@@ -262,14 +257,11 @@
command.clload(CLASS_NAME, BUNDLE_ID);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertFalse("Command output [" + output + "] contains bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
verify(bundle, bundleContext);
}
@@ -287,29 +279,24 @@
expect(bundle.getBundleId()).andReturn(BUNDLE_ID);
expect(bundleContext.getServiceReference(PlatformAdmin.class)).andReturn(platformAdminServiceReference);
expect(bundleContext.getService(platformAdminServiceReference)).andReturn(platformAdmin);
- expect(bundleContext.getBundles()).andReturn(new Bundle[]{bundle});
- expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[]{}); // nothing exported
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { bundle });
+ expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[] {}); // nothing exported
expect(platformAdmin.getState(false)).andReturn(bundleState);
expect(bundleState.getBundle(BUNDLE_ID)).andReturn(bundleDescription);
- replay(platformAdmin, platformAdminServiceReference,
- bundle, bundleContext, bundleState, bundleDescription);
+ replay(platformAdmin, platformAdminServiceReference, bundle, bundleContext, bundleState, bundleDescription);
GogoClassLoadingCommand command = new GogoClassLoadingCommand(bundleContext);
command.clexport(CLASS_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertFalse("Command output [" + output + "] contains bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertFalse("Command output [" + output + "] contains bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertFalse("Command output [" + output + "] contains bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
- verify(platformAdmin, platformAdminServiceReference,
- bundle, bundleContext, bundleState, bundleDescription);
+ verify(platformAdmin, platformAdminServiceReference, bundle, bundleContext, bundleState, bundleDescription);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@@ -325,35 +312,28 @@
expect(bundle.getBundleId()).andReturn(BUNDLE_ID).times(2);
expect(bundle.getSymbolicName()).andReturn(BUNDLE_SYMBOLIC_NAME);
- expect((Class)bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
+ expect((Class) bundle.loadClass(CLASS_NAME)).andReturn(GogoClassLoadingCommandTests.class);
expect(bundleContext.getServiceReference(PlatformAdmin.class)).andReturn(platformAdminServiceReference);
expect(bundleContext.getService(platformAdminServiceReference)).andReturn(platformAdmin);
- expect(bundleContext.getBundles()).andReturn(new Bundle[]{bundle});
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { bundle });
expect(exportPackageDescription.getName()).andReturn(CLASS_PACKAGE);
- expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[]{exportPackageDescription});
+ expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[] { exportPackageDescription });
expect(platformAdmin.getState(false)).andReturn(bundleState);
expect(bundleState.getBundle(BUNDLE_ID)).andReturn(bundleDescription);
- replay(platformAdmin, platformAdminServiceReference,
- bundle, bundleContext, bundleState, bundleDescription,
- exportPackageDescription);
+ replay(platformAdmin, platformAdminServiceReference, bundle, bundleContext, bundleState, bundleDescription, exportPackageDescription);
GogoClassLoadingCommand command = new GogoClassLoadingCommand(bundleContext);
command.clexport(CLASS_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertTrue("Command output [" + output + "] does not contain bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
- verify(platformAdmin, platformAdminServiceReference,
- bundle, bundleContext, bundleState, bundleDescription,
- exportPackageDescription);
+ verify(platformAdmin, platformAdminServiceReference, bundle, bundleContext, bundleState, bundleDescription, exportPackageDescription);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@@ -372,32 +352,25 @@
expect(bundle.loadClass(CLASS_NAME)).andReturn(null); // class cannot be loaded
expect(bundleContext.getServiceReference(PlatformAdmin.class)).andReturn(platformAdminServiceReference);
expect(bundleContext.getService(platformAdminServiceReference)).andReturn(platformAdmin);
- expect(bundleContext.getBundles()).andReturn(new Bundle[]{bundle});
+ expect(bundleContext.getBundles()).andReturn(new Bundle[] { bundle });
expect(exportPackageDescription.getName()).andReturn(CLASS_PACKAGE);
- expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[]{exportPackageDescription});
+ expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[] { exportPackageDescription });
expect(platformAdmin.getState(false)).andReturn(bundleState);
expect(bundleState.getBundle(BUNDLE_ID)).andReturn(bundleDescription);
- replay(platformAdmin, platformAdminServiceReference,
- bundle, bundleContext, bundleState, bundleDescription,
- exportPackageDescription);
+ replay(platformAdmin, platformAdminServiceReference, bundle, bundleContext, bundleState, bundleDescription, exportPackageDescription);
GogoClassLoadingCommand command = new GogoClassLoadingCommand(bundleContext);
command.clexport(CLASS_NAME);
String output = getOutput();
- assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]",
- output.contains("" + CLASS_NAME));
- assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]",
- output.contains("" + CLASS_PACKAGE));
- assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]",
- output.contains("" + BUNDLE_ID));
+ assertTrue("Command output [" + output + "] does not contain class name [" + CLASS_NAME + "]", output.contains("" + CLASS_NAME));
+ assertTrue("Command output [" + output + "] does not contain class package [" + CLASS_PACKAGE + "]", output.contains("" + CLASS_PACKAGE));
+ assertTrue("Command output [" + output + "] does not contain bundle ID [" + BUNDLE_ID + "]", output.contains("" + BUNDLE_ID));
assertTrue("Command output [" + output + "] does not contain bundle symbolic name [" + BUNDLE_SYMBOLIC_NAME + "]",
- output.contains(BUNDLE_SYMBOLIC_NAME));
+ output.contains(BUNDLE_SYMBOLIC_NAME));
- verify(platformAdmin, platformAdminServiceReference,
- bundle, bundleContext, bundleState, bundleDescription,
- exportPackageDescription);
+ verify(platformAdmin, platformAdminServiceReference, bundle, bundleContext, bundleState, bundleDescription, exportPackageDescription);
}
}