Package org.jboss.arquillian.test.spi.event.suite

Examples of org.jboss.arquillian.test.spi.event.suite.After


        assertEventFired(BeforeDroneInstantiated.class, 2);
        assertEventFired(AfterDroneInstantiated.class, 2);

        testDummyMethod.invoke(instance, dummyParameters);

        fire(new After(instance, testDummyMethod));

        // will be destroyed in after class
        assertEventFired(BeforeDroneDestroyed.class, 0);
        assertEventFired(AfterDroneDestroyed.class, 0);
View Full Code Here


        InstanceProducer<RemoteTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(null);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(TEST_OBJECT, testMethod));

        verifyZeroInteractions(applicationContextDestroyer);
    }
View Full Code Here

        InstanceProducer<RemoteTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(containerTestScopeApplicationContext);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(TEST_OBJECT, testMethod));

        verifyZeroInteractions(applicationContextDestroyer);
    }
View Full Code Here

        InstanceProducer<RemoteTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(containerTestScopeApplicationContext);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(new TestMethodTest(), TestMethodTest.class.getMethod("testMethod")));

        verify(applicationContextDestroyer).destroyApplicationContext(any(TestScopeApplicationContext.class));
    }
View Full Code Here

        InstanceProducer<RemoteTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(null);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(TEST_OBJECT, testMethod));

        verifyZeroInteractions(applicationContextDestroyer);
    }
View Full Code Here

        InstanceProducer<RemoteTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(containerTestScopeApplicationContext);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(TEST_OBJECT, testMethod));

        verifyZeroInteractions(applicationContextDestroyer);
    }
View Full Code Here

        InstanceProducer<RemoteTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(containerTestScopeApplicationContext);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(new TestMethodTest(), TestMethodTest.class.getMethod("testMethod")));

        verify(applicationContextDestroyer).destroyApplicationContext(any(TestScopeApplicationContext.class));
    }
View Full Code Here

   public void after(Object testInstance, Method testMethod, LifecycleMethodExecutor executor) throws Exception
   {
      Validate.notNull(testInstance, "TestInstance must be specified");
      Validate.notNull(testMethod, "TestMethod must be specified");

      manager.fire(new After(testInstance, testMethod, executor));
   }
View Full Code Here

        InstanceProducer<ClientTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(null);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(TEST_OBJECT, testMethod));

        verifyZeroInteractions(applicationContextDestroyer);
    }
View Full Code Here

        InstanceProducer<ClientTestScopeApplicationContext> mockApplicationContext = mock(InstanceProducer.class);
        when(mockApplicationContext.get()).thenReturn(ClientTestScopeApplicationContext);
        TestReflectionHelper.setFieldValue(instance, "applicationContextInstance", mockApplicationContext);

        instance.afterTest(new After(TEST_OBJECT, testMethod));

        verifyZeroInteractions(applicationContextDestroyer);
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.test.spi.event.suite.After

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.