Package junit.framework

Examples of junit.framework.Protectable


     * client.
     *
     * @throws Exception for any error
     */
    public void testDeclaredThrowable() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwThrowable();
            }
        };
        checkException(protectable, Throwable.class, null);
View Full Code Here


     * client.
     *
     * @throws Exception for any error
     */
    public void testDeclaredException() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwException();
            }
        };
        checkException(protectable, Exception.class, null);
View Full Code Here

     * Verifies that a declared <code>Error</code> is propagated to the client.
     *
     * @throws Exception for any error
     */
    public void testDeclaredError() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwError();
            }
        };
        checkException(protectable, Error.class, null);
View Full Code Here

     * client, wrapped in a {@link RemoteInvocationException}.
     *
     * @throws Exception for any error
     */
    public void testUndeclaredError() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwUndeclaredError();
            }
        };
        checkException(protectable, RemoteInvocationException.class,
View Full Code Here

     * the client.
     *
     * @throws Exception for any error
     */
    public void testDeclaredRuntimeException() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwRuntimeException();
            }
        };
        checkException(protectable, RuntimeException.class, null);
View Full Code Here

     * to the client, wrapped in a {@link RemoteInvocationException}.
     *
     * @throws Exception for any error
     */
    public void testUndeclaredRuntimeException() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwUndeclaredRuntimeException();
            }
        };
        checkException(protectable, RemoteInvocationException.class,
View Full Code Here

     * the client.
     *
     * @throws Exception for any error
     */
    public void testDeclaredRemoteException() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwRemoteException();
            }
        };
        checkException(protectable, RemoteException.class, null);
View Full Code Here

     * wrapped in a <code>RemoteException</code>.
     *
     * @throws Exception for any errror
     */
    public void testUndeclaredError2() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwUndeclaredError2();
            }
        };
        checkException(protectable, RemoteException.class, Error.class);
View Full Code Here

     * client, wrapped in a <code>RemoteException</code>.
     *
     * @throws Exception for any errror
     */
    public void testUndeclaredRuntimeException2() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwUndeclaredRuntimeException2();
            }
        };
        checkException(protectable, RemoteException.class,
View Full Code Here

     * by a method is propagated to the client unchanged.
     *
     * @throws Exception for any errror
     */
    public void testUndeclaredRemoteInvocationException() throws Exception {
        Protectable protectable = new Protectable() {
            public void protect() throws Throwable {
                _service.throwUndeclaredRemoteInvocationException();
            }
        };
        checkException(protectable, RemoteInvocationException.class, null);
View Full Code Here

TOP

Related Classes of junit.framework.Protectable

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.