Examples of Orange


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

        // make sure that both test properties are set here
        if (properties.get("test1") == null || properties.get("test2") == null)
        {
            throw new Exception("Both properties should be set before the factory method is called");
        }
        return new Orange();
    }
View Full Code Here

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

   
    protected void populateTestData(Context context) throws NamingException
    {
        context.bind("fruit/apple", new Apple());
        context.bind("fruit/banana", new Banana());
        context.bind("fruit/orange", new Orange(new Integer(8), new Double(10), "Florida Sunny"));
    }
View Full Code Here

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

        assertEquals("true", message.getOutboundProperty("boolean", ""));

        assertEquals(apple, message.getOutboundProperty("apple"));
        try
        {
            message.getOutboundProperty("apple", new Orange());
            fail("Orange is not assignable to Apple");
        }
        catch (IllegalArgumentException e)
        {
            //expected
View Full Code Here

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

    public void testWriteReadPayload() throws Exception
    {
        // Create orange to send over the wire
        Properties messageProerties = new Properties();
        messageProerties.put("key1", "val1");
        Orange inOrange = new Orange();
        inOrange.setBrand("Walmart");
        inOrange.setMapProperties(messageProerties);

        Object outObject = readWrite(inOrange);

        // Test deserialized Fruit
        // TODO This wire-format wraps desrialized payloads in a message. See
View Full Code Here

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

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

    @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

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

        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

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

        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

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

        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

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

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

    public Object getResultData()
    {
        return new Orange(14, 5.43, "Juicy");
    }
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.