Java 类java.rmi.ServerRuntimeException 实例源码

项目:cn1    文件:ServerRuntimeExceptionTest.java   
/**
 * {@link java.rmi.ServerRuntimeException#ServerRuntimeException(java.lang.String, java.lang.Exception)}.
 */
public void testServerRuntimeExceptionStringException() {
    NullPointerException npe = new NullPointerException();
    ServerRuntimeException e = new ServerRuntimeException("fixture", npe);
    assertTrue(e.getMessage().indexOf("fixture") > -1);
    assertSame(npe, e.getCause());
    assertSame(npe, e.detail);
}
项目:freeVM    文件:ServerRuntimeExceptionTest.java   
/**
 * {@link java.rmi.ServerRuntimeException#ServerRuntimeException(java.lang.String, java.lang.Exception)}.
 */
public void testServerRuntimeExceptionStringException() {
    NullPointerException npe = new NullPointerException();
    ServerRuntimeException e = new ServerRuntimeException("fixture", npe);
    assertTrue(e.getMessage().indexOf("fixture") > -1);
    assertSame(npe, e.getCause());
    assertSame(npe, e.detail);
}
项目:freeVM    文件:ServerRuntimeExceptionTest.java   
/**
 * {@link java.rmi.ServerRuntimeException#ServerRuntimeException(java.lang.String, java.lang.Exception)}.
 */
public void testServerRuntimeExceptionStringException() {
    NullPointerException npe = new NullPointerException();
    ServerRuntimeException e = new ServerRuntimeException("fixture", npe);
    assertTrue(e.getMessage().indexOf("fixture") > -1);
    assertSame(npe, e.getCause());
    assertSame(npe, e.detail);
}