Package org.mule.transformer.simple

Examples of org.mule.transformer.simple.ObjectToString


    public void initialise() throws InitialisationException
    {
        try
        {
            objectToString = new ObjectToString();
            objectToByteArray = new ObjectToByteArray();
            muleContext.getRegistry().applyProcessorsAndLifecycle(objectToString);
            muleContext.getRegistry().applyProcessorsAndLifecycle(objectToByteArray);
        }
        catch (MuleException e)
View Full Code Here


{
    public void testInject() throws Exception
    {
        LookupComponent component = new LookupComponent();

        muleContext.getRegistry().registerObject("transformer1", new ObjectToString());
        muleContext.getRegistry().registerObject("lookup", component);

        //Check that we got the transformers injected
        assertNotNull(component.getTransformer1());
        //optional
View Full Code Here

    }

    public void testSetInboundTransformer() throws Exception
    {
        TransformerPairWireFormat transPairWireFormat = (TransformerPairWireFormat) getWireFormat();
        transPairWireFormat.setInboundTransformer(new ObjectToString());
        assertTrue(transPairWireFormat.getInboundTransformer() instanceof ObjectToString);
    }
View Full Code Here

    }

    public void testSetOutboundTransformer() throws Exception
    {
        TransformerPairWireFormat transPairWireFormat = (TransformerPairWireFormat) getWireFormat();
        transPairWireFormat.setInboundTransformer(new ObjectToString());
        assertTrue(transPairWireFormat.getInboundTransformer() instanceof ObjectToString);
    }
View Full Code Here

    {
        String testUrl = "http://localhost:" + getPorts().get(0) + "/test/weather";
        MuleClient client = new MuleClient(muleContext);
        Object response = client.send(testUrl, "hello", null);
        assertNotNull(response);
        String stringResponse = (String) new ObjectToString().transform(response, "UTF-8");
        assertTrue(stringResponse.contains("<Success>true</Success>"));
    }
View Full Code Here

    @Test
    public void testInject() throws Exception
    {
        LookupComponent component = new LookupComponent();

        muleContext.getRegistry().registerObject("transformer1", new ObjectToString());
        muleContext.getRegistry().registerObject("lookup", component);

        //Check that we got the transformers injected
        assertNotNull(component.getTransformer1());
        //optional
View Full Code Here

    public void initialise() throws InitialisationException
    {
        try
        {
            objectToString = new ObjectToString();
            objectToByteArray = new ObjectToByteArray();
            muleContext.getRegistry().applyProcessorsAndLifecycle(objectToString);
            muleContext.getRegistry().applyProcessorsAndLifecycle(objectToByteArray);
        }
        catch (MuleException e)
View Full Code Here

    @Test
    public void testSetInboundTransformer() throws Exception
    {
        TransformerPairWireFormat transPairWireFormat = (TransformerPairWireFormat) getWireFormat();
        transPairWireFormat.setInboundTransformer(new ObjectToString());
        assertTrue(transPairWireFormat.getInboundTransformer() instanceof ObjectToString);
    }
View Full Code Here

    @Test
    public void testSetOutboundTransformer() throws Exception
    {
        TransformerPairWireFormat transPairWireFormat = (TransformerPairWireFormat) getWireFormat();
        transPairWireFormat.setInboundTransformer(new ObjectToString());
        assertTrue(transPairWireFormat.getInboundTransformer() instanceof ObjectToString);
    }
View Full Code Here

    {
        String testUrl = "http://localhost:" + port1.getNumber() + "/test/weather";
        MuleClient client = muleContext.getClient();
        Object response = client.send(testUrl, "hello", null);
        assertNotNull(response);
        String stringResponse = (String) new ObjectToString().transform(response, "UTF-8");
        assertTrue(stringResponse.contains("<Success>true</Success>"));
    }
View Full Code Here

TOP

Related Classes of org.mule.transformer.simple.ObjectToString

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.