コード例 #1
0
 @Test
 public void testInvokeWithStorageParameterWithNullStorage() throws Exception {
   final MethodDescriptor methodDescriptor =
       new MethodDescriptorImpl(getStubMethodWithStorageParameter(), 0, true);
   methodInvoker.invoke(methodDescriptor, null);
   assertEquals(1, invokeMessageList.size());
   assertEquals("stub with storage", invokeMessageList.get(0));
 }
コード例 #2
0
 @Test
 public void testInvokeWithStorageParameterWithStorage() throws Exception {
   final MethodDescriptor methodDescriptor =
       new MethodDescriptorImpl(getStubMethodWithStorageParameter(), 0, true);
   final Storage storage = new DefaultStorage();
   methodInvoker.invoke(methodDescriptor, storage);
   assertEquals(1, invokeMessageList.size());
   assertEquals("stub with storage", invokeMessageList.get(0));
   assertTrue(storage.get("store").isPresent());
   assertEquals("value", storage.get("store").get());
 }
コード例 #3
0
 @Test
 public void testInvokeWithNullStorage() throws Exception {
   methodInvoker.invoke(methodDescriptor, null);
   assertEquals(1, invokeMessageList.size());
   assertEquals("stub", invokeMessageList.get(0));
 }