/** * Discovers and sets the appropriate skeleton for the impl. */ public void setSkeleton(Remote impl) throws RemoteException { if (!withoutSkeletons.containsKey(impl.getClass())) { try { skel = Util.createSkeleton(impl); } catch (SkeletonNotFoundException e) { /* * Ignore exception for skeleton class not found, because a * skeleton class is not necessary with the 1.2 stub protocol. * Remember that this impl's class does not have a skeleton * class so we don't waste time searching for it again. */ withoutSkeletons.put(impl.getClass(), null); } } }
/** * Sets up the fixture, for example, open a network connection. This method * is called before a test is executed. */ @Override protected void setUp() { errorMessage = "Skeleton Not Found"; causeMessage = "Caused Exception"; cause = new SkeletonNotFoundException(causeMessage); }
public void assertDeserialized(Serializable initial, Serializable deserialized) { SerializationTest.THROWABLE_COMPARATOR.assertDeserialized(initial, deserialized); SkeletonNotFoundException initEx = (SkeletonNotFoundException) initial; SkeletonNotFoundException desrEx = (SkeletonNotFoundException) deserialized; assertEquals(initEx.getMessage(), desrEx.getMessage()); assertEquals(initEx.getCause().getMessage(), desrEx.getCause().getMessage()); }
/** * @tests java.rmi.server.SkeletonNotFoundException#SkeletonNotFoundException(String) */ public void test_Constructor_String() { SkeletonNotFoundException e = new SkeletonNotFoundException(errorMessage); assertTrue(e instanceof java.rmi.RemoteException); assertEquals(errorMessage, e.getMessage()); }
/** * @tests java.rmi.server.SkeletonNotFoundException#SkeletonNotFoundException(String,Exception) */ public void test_Constructor_String_Exception() { SkeletonNotFoundException e = new SkeletonNotFoundException(errorMessage, cause); assertEquals(cause.getMessage(), e.getCause().getMessage()); }
/** * @tests serialization/deserialization. */ public void testSerializationSelf() throws Exception { SerializationTest.verifySelf(new SkeletonNotFoundException(errorMessage, cause), comparator); }
/** * @tests serialization/deserialization compatibility with RI. */ public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new SkeletonNotFoundException(errorMessage, cause), comparator); }