Package org.mule.munit.common.mocking

Examples of org.mule.munit.common.mocking.SpyProcess


    public void test() throws Exception {

        Map<String, Object> a = new HashMap<String, Object>();
        a.put("project", "test-project");

        SpyProcess spyAfter = new SpyProcess() {
            @Override
            public void spy(MuleEvent event) throws MuleException {
                Assert.assertTrue("Mocked Jira".equals(event.getMessage().getPayload()));
                System.out.println(event.getMessage().getPayload());
            }
        };

        SpyProcess spyBefore = new SpyProcess() {
            @Override
            public void spy(MuleEvent event) throws MuleException {
                Assert.assertTrue(event.getMessage().getPayload() instanceof Map);
                System.out.println(event.getMessage().getPayload());
            }
View Full Code Here


        return mps;
    }

    protected SpyProcess createSpy(final List<MessageProcessor> messageProcessorsFrom)
    {
        return new SpyProcess()
        {

            @Override
            public void spy(MuleEvent event) throws MuleException
            {
View Full Code Here

    }

    @Test
    public void createSpyIsCorrect() throws MuleException
    {
        SpyProcess spyProcess = module().createSpy(createMessageProcessors());

        MuleEvent event = mock(MuleEvent.class);
        spyProcess.spy(event);

        verify(messageProcessor, times(1)).process(event);
    }
View Full Code Here

TOP

Related Classes of org.mule.munit.common.mocking.SpyProcess

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.