Package org.jboss.arquillian.test.spi

Examples of org.jboss.arquillian.test.spi.TestClass


    /**
     * <p>Tests the {@link XmlRemoteApplicationContextProducer#createApplicationContext(TestClass)} method.</p>
     */
    @Test
    public void testCreateApplicationContextDefault() {
        TestClass testClass = new TestClass(XmlAnnotatedClass.class);

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
View Full Code Here


     *
     * @throws Exception if any error occurs
     */
    @Test
    public void testCreateApplicationContextCustomContextConfiguration() throws Exception {
        TestClass testClass = new TestClass(XmlAnnotatedClass.class);

        Map<String, String> properties = new HashMap<String, String>();
        properties.put("customContextClass", "org.springframework.context.support.ClassPathXmlApplicationContext");
        remoteConfiguration = new SpringIntegrationConfiguration(properties);

View Full Code Here

     *
     * @throws Exception if any error occurs
     */
    @Test(expected = RuntimeException.class)
    public void testCreateApplicationContextCustomContextConfigurationError() throws Exception {
        TestClass testClass = new TestClass(XmlAnnotatedClass.class);

        Map<String, String> properties = new HashMap<String, String>();
        properties.put("customContextClass", "invalid class name");
        remoteConfiguration = new SpringIntegrationConfiguration(properties);

View Full Code Here

    /**
     * <p>Tests the {@link XmlRemoteApplicationContextProducer#createApplicationContext(TestClass)} method.</p>
     */
    @Test
    public void testCreateApplicationContextCustomContext() {
        TestClass testClass = new TestClass(XmlAnnotatedCustomContextClass.class);

        TestScopeApplicationContext result = instance.createApplicationContext(testClass);

        assertNotNull("The result was null.", result);
        assertTrue("The application context should be marked as closable.", result.isClosable());
View Full Code Here

     *
     * @throws Exception if any error occurs
     */
    @Test(expected = RuntimeException.class)
    public void testCreateApplicationContextCustomContextConfigurationAndAnnotation() throws Exception {
        TestClass testClass = new TestClass(XmlAnnotatedCustomContextClass.class);

        Map<String, String> properties = new HashMap<String, String>();
        properties.put("customContextClass", "invalid class name");
        remoteConfiguration = new SpringIntegrationConfiguration(properties);

View Full Code Here

     *
     * <p>{@link RuntimeException} is expected.</p>
     */
    @Test(expected = RuntimeException.class)
    public void testCreateApplicationContextMissingResource() {
        TestClass testClass = new TestClass(XmlAnnotatedMissingResourceClass.class);

        instance.createApplicationContext(testClass);
    }
View Full Code Here

    }

    @Test
    public void shouldCreateApplicationContextFromDefaultLocation() {
        // given
        TestClass testClass = new TestClass(XmlAnnotatedClassWithDefaultContextLocationDefined.class);

        // when
        RemoteTestScopeApplicationContext applicationContext = instance.createApplicationContext(testClass);

        // then
View Full Code Here

    }

    @Test
    public void shouldUseCustomResourceLocationsFileInsteadOfDefaultLocation() {
        // given
        TestClass testClass = new TestClass(XmlAnnotatedClassWithBothCustomAndDefaultContextLocationsDefined.class);

        // when
        RemoteTestScopeApplicationContext applicationContext = instance.createApplicationContext(testClass);

        // then
View Full Code Here

    /**
     * <p>Tests the {@link WebApplicationContextProducer#supports(org.jboss.arquillian.test.spi.TestClass)} method.</p>
     */
    @Test
    public void testSupportsFalse() {
        TestClass testClass = new TestClass(PlainClass.class);

        assertFalse("Class without annotations shouldn't be supported.", instance.supports(testClass));
    }
View Full Code Here

    /**
     * <p>Tests the {@link WebApplicationContextProducer#supports(TestClass)} method.</p>
     */
    @Test
    public void testSupportsTrue() {
        TestClass testClass = new TestClass(WebAnnotatedClass.class);

        assertTrue("Class should be supported.", instance.supports(testClass));
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.test.spi.TestClass

Copyright © 2018 www.massapicom. 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.