public class OSGiTestHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SYSPROP_TEST_ARCHIVE_DIRECTORY |
static String |
SYSPROP_TEST_RESOURCES_DIRECTORY |
| Modifier and Type | Method and Description |
|---|---|
static org.jboss.shrinkwrap.api.spec.JavaArchive |
assembleArchive(String name,
String[] resources,
Class<?>... packages) |
static org.jboss.shrinkwrap.api.spec.JavaArchive |
assembleArchive(String name,
String resource,
Class<?>... packages) |
static void |
assertBundleState(int expState,
int wasState) |
static Class<?> |
assertLoadClass(org.osgi.framework.Bundle bundle,
String className) |
static void |
assertLoadClass(org.osgi.framework.Bundle bundle,
String className,
org.osgi.framework.Bundle exporter) |
static void |
assertLoadClassFail(org.osgi.framework.Bundle bundle,
String className) |
static String |
getFrameworkName() |
static File |
getResourceFile(String resource)
Try to discover the File for the test resource
|
static URL |
getResourceURL(String resource)
Try to discover the URL for the test resource
|
static String |
getServerHost() |
static String |
getTargetContainer() |
static File |
getTestArchiveFile(String archive)
Try to discover the File for the deployment archive
|
static String |
getTestArchivePath(String archive)
Try to discover the absolute path for the deployment archive
|
static URL |
getTestArchiveURL(String archive)
Try to discover the URL for the deployment archive
|
static InputStream |
toInputStream(org.jboss.shrinkwrap.api.Archive<?> archive) |
static org.jboss.osgi.vfs.VirtualFile |
toVirtualFile(org.jboss.shrinkwrap.api.Archive<?> archive) |
public static final String SYSPROP_TEST_RESOURCES_DIRECTORY
public static final String SYSPROP_TEST_ARCHIVE_DIRECTORY
public static URL getResourceURL(String resource)
public static File getResourceFile(String resource)
public static URL getTestArchiveURL(String archive)
public static String getTestArchivePath(String archive)
public static File getTestArchiveFile(String archive)
public static String getServerHost()
public static String getTargetContainer()
public static String getFrameworkName()
public static org.jboss.shrinkwrap.api.spec.JavaArchive assembleArchive(String name, String resource, Class<?>... packages) throws Exception
Exceptionpublic static org.jboss.shrinkwrap.api.spec.JavaArchive assembleArchive(String name, String[] resources, Class<?>... packages) throws IOException
IOExceptionpublic static org.jboss.osgi.vfs.VirtualFile toVirtualFile(org.jboss.shrinkwrap.api.Archive<?> archive)
throws IOException,
MalformedURLException
IOExceptionMalformedURLExceptionpublic static InputStream toInputStream(org.jboss.shrinkwrap.api.Archive<?> archive) throws IOException
IOExceptionpublic static void assertBundleState(int expState,
int wasState)
public static Class<?> assertLoadClass(org.osgi.framework.Bundle bundle, String className)
public static void assertLoadClassFail(org.osgi.framework.Bundle bundle,
String className)
public static void assertLoadClass(org.osgi.framework.Bundle bundle,
String className,
org.osgi.framework.Bundle exporter)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.