Examples of TestContainerException


Examples of org.glassfish.jersey.test.spi.TestContainerException

    private static Class<? extends TestContainerFactory> loadFactoryClass(final String factoryClassName) {
        Class<? extends TestContainerFactory> factoryClass;
        final Class<Object> loadedClass = AccessController.doPrivileged(ReflectionHelper.classForNamePA(factoryClassName, null));
        if (loadedClass == null) {
            throw new TestContainerException(String.format(
                    "Test container factory class '%s' cannot be loaded", factoryClassName));
        }
        try {
            return loadedClass.asSubclass(TestContainerFactory.class);
        } catch (final ClassCastException ex) {
            throw new TestContainerException(String.format(
                    "Class '%s' does not implement TestContainerFactory SPI.", factoryClassName), ex);
        }
    }
View Full Code Here

Examples of org.glassfish.jersey.test.spi.TestContainerException

        private JettyTestContainer(final URI baseUri, final DeploymentContext context) {
            final URI base = UriBuilder.fromUri(baseUri).path(context.getContextPath()).build();

            if (!"/".equals(base.getRawPath())) {
                throw new TestContainerException(String.format(
                        "Cannot deploy on %s. Jetty HTTP container only supports deployment on root path.",
                        base.getRawPath()));
            }

            this.baseUri = base;
View Full Code Here

Examples of org.glassfish.jersey.test.spi.TestContainerException

                        baseUri = UriBuilder.fromUri(baseUri).port(port).build();

                        LOGGER.log(Level.INFO, "Started JettyTestContainer at the base URI " + baseUri);
                    }
                } catch (Exception e) {
                    throw new TestContainerException(e);
                }
            }
        }
View Full Code Here

Examples of org.glassfish.jersey.test.spi.TestContainerException

            }

            try {
                this.server = GrizzlyHttpServerFactory.createHttpServer(uri, appHandler);
            } catch (ProcessingException e) {
                throw new TestContainerException(e);
            }
        }
View Full Code Here

Examples of org.glassfish.jersey.test.spi.TestContainerException

            }

            try {
                this.server = SimpleContainerFactory.create(uri, appHandler);
            } catch (ProcessingException e) {
                throw new TestContainerException(e);
            }
        }
View Full Code Here

Examples of org.glassfish.jersey.test.spi.TestContainerException

            }

            try {
                this.server = JdkHttpServerFactory.createHttpServer(uri, appHandler);
            } catch (ProcessingException e) {
                throw new TestContainerException(e);
            }
        }
View Full Code Here

Examples of org.ops4j.pax.exam.TestContainerException

                .set(Constants.BUNDLE_SYMBOLICNAME, "org.ops4j.pax.exam.sample9.fragment")
                .add("messages.properties", getClass().getResource("/messages.properties"));
            return bundle.build();
        }
        catch (IOException e) {
            throw new TestContainerException(e);
        }

    }
View Full Code Here

Examples of org.ops4j.pax.exam.TestContainerException

            Store<InputStream> store = StoreFactory.anonymousStore();
            Handle handle = store.store(bundle.build());
            return store.getLocation(handle).toURL();
        }
        catch (IOException e) {
            throw new TestContainerException(e);
        }
    }
View Full Code Here

Examples of org.ops4j.pax.exam.TestContainerException

            disableConfigurationMethods(suite);
            Object testClassInstance = testClass.newInstance();
            return stageReactorForClass(testClass, testClassInstance);
        }
        catch (InstantiationException | IllegalAccessException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here

Examples of org.ops4j.pax.exam.TestContainerException

                addTestsToReactor(examReactor, testClassInstance, methods);
            }
            return manager.stageReactor();
        }
        catch (IOException | ExamConfigurationException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.