Package tests.support

Examples of tests.support.Support_Proxy_I1


        }
        return null;
      }
    });

    Support_Proxy_I1 proxy = (Support_Proxy_I1) p;
    assertTrue("Failed identity test ", proxy.equals(proxy));
    assertTrue("Failed not equals test ", !proxy.equals(""));
    int[] result = (int[]) proxy.array(new long[] { 100L, -200L });
    assertEquals("Failed base type conversion test ", -200, result[0]);

    boolean worked = false;
    try {
      proxy.string("");
    } catch (Support_Proxy_SubException e) {
      worked = true;
    } catch (Support_Proxy_ParentException e) { // is never thrown
    }
    assertTrue("Problem converting exception ", worked);

    worked = false;
    try {
      proxy.string("clone");
    } catch (Support_Proxy_ParentException e) { // is never thrown
    } catch (UndeclaredThrowableException e) {
      worked = true;
    }
    assertTrue("Problem converting exception ", worked);

    worked = false;
    try {
      proxy.string("error");
    } catch (Support_Proxy_ParentException e) { // is never thrown
    } catch (UndeclaredThrowableException e) {
    } catch (RuntimeException e) {
      worked = e.getClass() == ArrayStoreException.class;
    }
    assertTrue("Problem converting exception ", worked);

    worked = false;
    try {
      proxy.string("any");
    } catch (Support_Proxy_ParentException e) { // is never thrown
    } catch (UndeclaredThrowableException e) {
      worked = true;
    }
    assertTrue("Problem converting exception ", worked);
View Full Code Here


        }
        return null;
      }
    });

    Support_Proxy_I1 proxy = (Support_Proxy_I1) p;
    assertTrue("Failed identity test ", proxy.equals(proxy));
    assertTrue("Failed not equals test ", !proxy.equals(""));
    int[] result = (int[]) proxy.array(new long[] { 100L, -200L });
    assertEquals("Failed base type conversion test ", -200, result[0]);

    try {
      proxy.string("");
            fail("Problem converting exception");
    } catch (Support_Proxy_SubException e) {
    }

    try {
      proxy.string("clone");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(Support_Proxy_ParentException.class, e.getCause().getClass());
    }

    try {
      proxy.string("error");
            fail("Problem converting exception");
    } catch (ArrayStoreException e) {
    }

    try {
      proxy.string("any");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(IllegalAccessException.class, e.getCause().getClass());
    }
View Full Code Here

        }
        return null;
      }
    });

    Support_Proxy_I1 proxy = (Support_Proxy_I1) p;
    assertTrue("Failed identity test ", proxy.equals(proxy));
    assertTrue("Failed not equals test ", !proxy.equals(""));
    int[] result = (int[]) proxy.array(new long[] { 100L, -200L });
    assertEquals("Failed base type conversion test ", -200, result[0]);

    try {
      proxy.string("");
            fail("Problem converting exception");
    } catch (Support_Proxy_SubException e) {
    }

    try {
      proxy.string("clone");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(Support_Proxy_ParentException.class, e.getCause().getClass());
    }

    try {
      proxy.string("error");
            fail("Problem converting exception");
    } catch (ArrayStoreException e) {
    }

    try {
      proxy.string("any");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(IllegalAccessException.class, e.getCause().getClass());
    }
View Full Code Here

        }
        return null;
      }
    });

    Support_Proxy_I1 proxy = (Support_Proxy_I1) p;
    assertTrue("Failed identity test ", proxy.equals(proxy));
    assertTrue("Failed not equals test ", !proxy.equals(""));
    int[] result = (int[]) proxy.array(new long[] { 100L, -200L });
    assertEquals("Failed base type conversion test ", -200, result[0]);

    try {
      proxy.string("");
            fail("Problem converting exception");
    } catch (Support_Proxy_SubException e) {
    }

    try {
      proxy.string("clone");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(Support_Proxy_ParentException.class, e.getCause().getClass());
    }

    try {
      proxy.string("error");
            fail("Problem converting exception");
    } catch (ArrayStoreException e) {
    }

    try {
      proxy.string("any");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(IllegalAccessException.class, e.getCause().getClass());
    }
View Full Code Here

        }
        return null;
      }
    });

    Support_Proxy_I1 proxy = (Support_Proxy_I1) p;
    assertTrue("Failed identity test ", proxy.equals(proxy));
    assertTrue("Failed not equals test ", !proxy.equals(""));
    int[] result = (int[]) proxy.array(new long[] { 100L, -200L });
    assertEquals("Failed base type conversion test ", -200, result[0]);

    try {
      proxy.string("");
            fail("Problem converting exception");
    } catch (Support_Proxy_SubException e) {
    }

    try {
      proxy.string("clone");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(Support_Proxy_ParentException.class, e.getCause().getClass());
    }

    try {
      proxy.string("error");
            fail("Problem converting exception");
    } catch (ArrayStoreException e) {
    }

    try {
      proxy.string("any");
            fail("Problem converting exception");
    } catch (UndeclaredThrowableException e) {
            assertSame(IllegalAccessException.class, e.getCause().getClass());
    }
View Full Code Here

TOP

Related Classes of tests.support.Support_Proxy_I1

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.