Package org.mule.tck.testmodels.fruit

Examples of org.mule.tck.testmodels.fruit.Orange


        return "<fruit><orange name=\"Juicy\"><segments>14</segments><radius>5.43</radius></orange></fruit>";
    }

    public Object getResultData()
    {
        return new Orange(14, 5.43, "Juicy");
    }
View Full Code Here


    @Test
    public void testTransientRegistryPrecedence() throws Exception
    {
        context = new DefaultMuleContextFactory().createMuleContext();

        context.getRegistry().registerObject("orange", new Orange(12, 5.5, "Tutti Frutti"));

        ApplicationContext appContext = new ClassPathXmlApplicationContext("application-context.xml");
        ConfigurationBuilder builder = new SpringConfigurationBuilder(appContext);
        builder.configure(context);
View Full Code Here

        Session session = mock(Session.class);
        when(session.createObjectMessage()).thenReturn(new ActiveMQObjectMessage());

        // Creates a test Map containing a serializable object
        Map data = new HashMap();
        data.put("orange", new Orange());

        Message message = JmsMessageUtils.toMessage(data, session);
        assertTrue(message instanceof ObjectMessage);

        ObjectMessage objectMessage = (ObjectMessage) message;
        Map values = (Map) objectMessage.getObject();
        assertEquals(new Orange(), values.get("orange"));
    }
View Full Code Here

        splitter.setListener(listener);
        splitter.setMuleContext(muleContext);

        Apple apple = new Apple();
        Banana banana = new Banana();
        Orange orange = new Orange();
        FruitBowl fruitBowl = new FruitBowl();
        fruitBowl.addFruit(apple);
        fruitBowl.addFruit(banana);
        fruitBowl.addFruit(orange);
View Full Code Here

        syncSplitter.addRoute(mockendpoint5);
        syncSplitter.addRoute(mockendpoint6);
        List<Object> payload = new ArrayList<Object>();
        payload.add(new Apple());
        payload.add(new Apple());
        payload.add(new Orange());
        payload.add("");
        MuleMessage message = new DefaultMuleMessage(payload, muleContext);

        assertTrue(asyncSplitter.isMatch(message));
        when(mockendpoint1.process(any(MuleEvent.class))).thenAnswer(new MuleEventCheckAnswer());
View Full Code Here

        return new DefaultMuleMessage("Juicy", props, muleContext);
    }

    public Object getResultData()
    {
        return new Orange(14, 5.43, "Juicy");
    }
View Full Code Here

        assertEquals(Apple.class, component.getObjectFactory().getObjectClass());
        assertEquals(Apple.class, component.getObjectType());

        try
        {
            component = new SimpleCallableJavaComponent(new Orange());
        }
        catch (Exception e)
        {
            assertSame(DefaultMuleException.class, e.getClass());
        }
View Full Code Here

            setReturnDataType(DataTypeFactory.create(Orange.class));
        }

        protected Object doTransform(Object src, String encoding) throws TransformerException
        {
            return new Orange();
        }
View Full Code Here

            registerSourceType(DataTypeFactory.STRING);
        }

        protected Object doTransform(Object src, String encoding) throws TransformerException
        {
            return new Orange();
        }
View Full Code Here

        super.doSetUp();

        payload = new ArrayList<Object>();
        payload.add(new Apple());
        payload.add(new Apple());
        payload.add(new Orange());
        payload.add(new String());
    }
View Full Code Here

TOP

Related Classes of org.mule.tck.testmodels.fruit.Orange

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.