Examples of execute()


Examples of org.mokai.action.ReplaceAction.execute()

    action.setReplace(replace);

    Message message = new Message();
    message.setProperty("message", "áéíó badword");

    action.execute(message);

    Assert.assertEquals(message.getProperty("message", String.class), "aenh _");
  }

  @Test(expectedExceptions=IllegalArgumentException.class)
View Full Code Here

Examples of org.mokai.action.UpdateAction.execute()

    UpdateAction updateAction = new UpdateAction();
    updateAction.setField("new");
    updateAction.setValue("test-new");

    updateAction.execute(message);

    Assert.assertEquals(message.getProperties().size(), 3);
    Assert.assertEquals(message.getProperty("new", String.class), "test-new");
    Assert.assertEquals(message.getProperty("to", String.class), "test-to");
    Assert.assertEquals(message.getProperty("from", String.class), "test-from");
View Full Code Here

Examples of org.mokai.action.mail.EmailToSmsAction.execute()

      .setProperty("text", "This is a test");

    EmailToSmsAction action = new EmailToSmsAction();
    action.setSmsTo("573001222222");

    action.execute(message);

    Assert.assertEquals(message.getProperty("to", String.class), "573001222222");
    Assert.assertEquals(message.getProperty("emailTo", String.class), "german.escobarc@gmail.com");
    Assert.assertEquals(message.getProperty("from", String.class), "12345");
    Assert.assertEquals(message.getProperty("emailFrom", String.class), "test@localhost.com");
View Full Code Here

Examples of org.moresbycoffee.mbyhave8.MByHaveSpec.execute()

            Feature("Implementationless step",
                Scenario("testing implementationless step",
                    given("a step without implementation")));
        }};

        val output = spec.execute();

        assertEquals(SpecResult.Pending, output.getResult());
    }

View Full Code Here

Examples of org.moresbycoffee.mbyhave8.structure.Scenario.execute()

        final ScenarioHooks hooks = Mockito.mock(ScenarioHooks.class);
        final InOrder inOrder = Mockito.inOrder(hooks);

        final Scenario scenario = TestUtils.successScenario();

        scenario.execute(hooks);

        final ArgumentCaptor<Scenario> scenarioCaptor = ArgumentCaptor.forClass(Scenario.class);
        inOrder.verify(hooks).startScenario(scenarioCaptor.capture());
        inOrder.verify(hooks).endScenario(Mockito.eq(scenarioCaptor.getValue()), Mockito.eq(ScenarioResult.Success));
View Full Code Here

Examples of org.moresbycoffee.mbyhave8.structure.Step.execute()

        final Step andStep = new MByHaveSpec() {
            Step innerStep = and("an And step", () -> { visited.set(true); return StepResult.Success; });
        }.innerStep;

        final StepOutput result = andStep.execute(DummyStepHooks.DUMMY);

        assertEquals(StepResult.Success, result.getResult());
        assertTrue("The and step execution should execute the step implementation and change the visited flag", visited.get());
    }
View Full Code Here

Examples of org.mule.api.FutureMessageResult.execute()

                return sendEvent(muleMessage);
            }
        };

        FutureMessageResult result = new FutureMessageResult(callable, event.getMuleContext());
        result.execute();
        return result;
    }

    /**
     * sends an event request via the configured outbound router for this service.
View Full Code Here

Examples of org.mule.api.client.LocalMuleClient.execute()

      }
     
      byte[] responseBytes = null;
      try {
        // execute the POST request
        HttpResponse response = client.execute(request);
        responseBytes = IOUtils.toByteArray(response.getEntity().getContent());
       
      } finally {
        // release any connection resources used by the method
        request.releaseConnection();
View Full Code Here

Examples of org.mule.api.execution.ExecutionTemplate.execute()

        TransactionCoordination.getInstance().bindTransaction(mockTransaction);
        mockTransaction.setXA(true);
        MuleTransactionConfig config = new MuleTransactionConfig(TransactionConfig.ACTION_ALWAYS_BEGIN);
        ExecutionTemplate executionTemplate = createExecutionTemplate(config);
        config.setFactory(new TestTransactionFactory(mockNewTransaction));
        Object result = executionTemplate.execute(getEmptyTransactionCallback());
        assertThat((MuleEvent) result, is(RETURN_VALUE));
        verify(mockNewTransaction).commit();
        verify(mockNewTransaction, VerificationModeFactory.times(0)).rollback();
        verify(mockTransaction).suspend();
        verify(mockTransaction).resume();
View Full Code Here

Examples of org.mule.api.retry.RetryPolicyTemplate.execute()

            {
                incrementProcessAttemptCountOrRemoveFromStore(eventStoreKey);
            }
        });

        retryPolicyTemplate.execute(callback, muleContext.getWorkManager());
    }

    private EventStoreKey storeEvent(final MuleEvent event) throws ObjectStoreException
    {
        MuleMessage message = event.getMessage();
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.