Examples of echoBack()


Examples of org.apache.commons.proxy.util.Echo.echoBack()

    public void testCreateNullObject() throws Exception
    {
        final Echo nullEcho = ( Echo ) ProxyUtils
                .createNullObject( new JavassistProxyFactory(), new Class[]{ Echo.class } );
        assertNull( nullEcho.echoBack( "hello" ) );
        assertNull( nullEcho.echoBack( "hello", "world" ) );
        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
    }

    public void testCreateNullObjectWithClassLoader() throws Exception
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

    public void testCreateNullObject() throws Exception
    {
        final Echo nullEcho = ( Echo ) ProxyUtils
                .createNullObject( new JavassistProxyFactory(), new Class[]{ Echo.class } );
        assertNull( nullEcho.echoBack( "hello" ) );
        assertNull( nullEcho.echoBack( "hello", "world" ) );
        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
    }

    public void testCreateNullObjectWithClassLoader() throws Exception
    {
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

    {
        final Echo nullEcho = ( Echo ) ProxyUtils
                .createNullObject( new JavassistProxyFactory(), new Class[]{ Echo.class } );
        assertNull( nullEcho.echoBack( "hello" ) );
        assertNull( nullEcho.echoBack( "hello", "world" ) );
        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
    }

    public void testCreateNullObjectWithClassLoader() throws Exception
    {
        final Echo nullEcho = ( Echo ) ProxyUtils.createNullObject( new JavassistProxyFactory(),
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

    public void testCreateNullObjectWithClassLoader() throws Exception
    {
        final Echo nullEcho = ( Echo ) ProxyUtils.createNullObject( new JavassistProxyFactory(),
                                                                    Echo.class.getClassLoader(),
                                                                    new Class[]{ Echo.class } );
        assertNull( nullEcho.echoBack( "hello" ) );
        assertNull( nullEcho.echoBack( "hello", "world" ) );
        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
    }

    public void testGetAllInterfaces()
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

    {
        final Echo nullEcho = ( Echo ) ProxyUtils.createNullObject( new JavassistProxyFactory(),
                                                                    Echo.class.getClassLoader(),
                                                                    new Class[]{ Echo.class } );
        assertNull( nullEcho.echoBack( "hello" ) );
        assertNull( nullEcho.echoBack( "hello", "world" ) );
        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
    }

    public void testGetAllInterfaces()
    {
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

        final Echo nullEcho = ( Echo ) ProxyUtils.createNullObject( new JavassistProxyFactory(),
                                                                    Echo.class.getClassLoader(),
                                                                    new Class[]{ Echo.class } );
        assertNull( nullEcho.echoBack( "hello" ) );
        assertNull( nullEcho.echoBack( "hello", "world" ) );
        assertEquals( ( int ) 0, nullEcho.echoBack( 12345 ) );
    }

    public void testGetAllInterfaces()
    {
        assertNull( ProxyUtils.getAllInterfaces( null ) );
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

        final XmlRpcInvoker handler = new XmlRpcInvoker( client, "invalid" );
        final Echo echo = ( Echo ) new CglibProxyFactory()
                .createInvokerProxy( handler, new Class[]{ Echo.class } );
        try
        {
            echo.echoBack( "Hello" );
            fail();
        }
        catch( InvokerException e )
        {
        }
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

    public void testValidInvocation() throws Exception
    {
        final XmlRpcInvoker handler = new XmlRpcInvoker( client, "echo" );
        final Echo echo = ( Echo ) new CglibProxyFactory()
                .createInvokerProxy( handler, new Class[]{ Echo.class } );
        assertEquals( "Hello", echo.echoBack( "Hello" ) );

    }
}
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

    public void testInvokerProxy() throws Exception
    {
        final InvokerTester tester = new InvokerTester();
        final Echo echo = ( Echo )factory.createInvokerProxy( tester, ECHO_ONLY );
        echo.echoBack( "hello" );
        assertEquals( Echo.class.getMethod( "echoBack", new Class[] { String.class } ), tester.method );
        assertSame( echo, tester.proxy );
        assertNotNull( tester.args );
        assertEquals( 1, tester.args.length );
        assertEquals( "hello", tester.args[0] );
View Full Code Here

Examples of org.apache.commons.proxy.util.Echo.echoBack()

    public void testCreateDelegatingProxy()
    {
        final Echo echo = ( Echo ) factory.createDelegatorProxy( createSingletonEcho(), ECHO_ONLY );
        echo.echo();
        assertEquals( "message", echo.echoBack( "message" ) );
        assertEquals( "ab", echo.echoBack( "a", "b" ) );
    }

    public void testBooleanInterceptorParameter()
    {
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.