Package org.jboss.arquillian.test.spi

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


      return new Statement()
      {
         @Override
         public void evaluate() throws Throwable
         {
            TestResult result = State.getTestAdaptor().test(new TestMethodExecutor()
            {
               @Override
               public void invoke(Object... parameters) throws Throwable
               {
                  try
View Full Code Here


   {
      verifyTestRunnerAdaptorHasBeenSet();
      TestResult result;
      try
      {
         result = deployableTest.get().test(new TestMethodExecutor()
         {
            public void invoke(Object... parameters) throws Throwable
            {
               /*
                *  The parameters are stored in the InvocationHandler, so we can't set them on the test result directly.
View Full Code Here

      return new Statement()
      {
         @Override
         public void evaluate() throws Throwable
         {
            TestResult result = adaptor.test(new TestMethodExecutor()
            {
               @Override
               public void invoke(Object... parameters) throws Throwable
               {
                  try
View Full Code Here

   public void run(final IHookCallBack callback, final ITestResult testResult)
   {
      TestResult result;
      try
      {
         result = deployableTest.get().test(new TestMethodExecutor()
         {
            public void invoke(Object... parameters) throws Throwable
            {
               /*
                *  The parameters are stored in the InvocationHandler, so we can't set them on the test result directly.
View Full Code Here

    * @see org.spockframework.runtime.extension.AbstractMethodInterceptor#interceptFeatureMethod(org.spockframework.runtime.extension.IMethodInvocation)
    */
   @Override
   public void interceptFeatureMethod(final IMethodInvocation invocation) throws Throwable
   {
      TestResult result = getTestRunner().test(new TestMethodExecutor()
      {
         @Override
         public Method getMethod()
         {
            return invocation.getFeature().getFeatureMethod().getReflection();
View Full Code Here

   }

   @Test
   public void shouldInvokeTestInContainerDeploymentContext() throws Exception
   {
      fire(new org.jboss.arquillian.test.spi.event.suite.Test(new TestMethodExecutor()
      {
         @Override
         public void invoke(Object... parameters) throws Throwable { }

         @Override
View Full Code Here

   @Test
   public void shouldNotInvokeTestInContainerDeploymentContextIfNoDeploymentFound() throws Exception
   {
      // override previous bound DeploymentScenario with a empty set
      bind(ClassScoped.class, DeploymentScenario.class, new DeploymentScenario());
      fire(new org.jboss.arquillian.test.spi.event.suite.Test(new TestMethodExecutor()
      {
         @Override
         public void invoke(Object... parameters) throws Throwable { }

         @Override
View Full Code Here

   }

   @Test(expected = IllegalStateException.class)
   public void shouldThrowExceptionIfTryingToOperateOnANonExistingContext() throws Exception
   {
      fire(new org.jboss.arquillian.test.spi.event.suite.Test(new TestMethodExecutor()
      {
         @Override
         public void invoke(Object... parameters) throws Throwable { }

         @Override
View Full Code Here

      assertEventFired(LocalExecutionEvent.class, 1);
   }

   private org.jboss.arquillian.test.spi.event.suite.Test test(String testMethodName, Object obj) throws Exception
   {
      TestMethodExecutor executor = mock(TestMethodExecutor.class);
      when(executor.getInstance()).thenReturn(obj);
      when(executor.getMethod()).thenReturn(method(testMethodName));

      return new org.jboss.arquillian.test.spi.event.suite.Test(
            executor
      );
   }
View Full Code Here

      return new Statement()
      {
         @Override
         public void evaluate() throws Throwable
         {
            TestResult result = adaptor.test(new TestMethodExecutor()
            {
               @Override
               public void invoke(Object... parameters) throws Throwable
               {
                  try
View Full Code Here

TOP

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

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.