コード例 #1
0
 @Test
 public void testInterceptorClass() throws Exception {
   TestDescriptorImpl provider = new TestDescriptorImpl("test");
   InterceptorType<TestDescriptorImpl> type =
       new InterceptorTypeImpl<TestDescriptorImpl>(
           provider, "interceptorType", provider.getRootNode());
   type.setInterceptorClass("test");
   assertEquals(type.getInterceptorClass(), "test");
   type.removeInterceptorClass();
   assertNull(type.getInterceptorClass());
 }
コード例 #2
0
 @Test
 public void testAroundTimeout() throws Exception {
   TestDescriptorImpl provider = new TestDescriptorImpl("test");
   InterceptorType<TestDescriptorImpl> type =
       new InterceptorTypeImpl<TestDescriptorImpl>(
           provider, "interceptorType", provider.getRootNode());
   type.aroundTimeout().up();
   type.aroundTimeout().up();
   assertTrue(type.getAroundTimeoutList().size() == 2);
   type.removeAllAroundTimeout();
   assertTrue(type.getAroundTimeoutList().size() == 0);
 }
コード例 #3
0
 @Test
 public void testDescription() throws Exception {
   TestDescriptorImpl provider = new TestDescriptorImpl("test");
   InterceptorType<TestDescriptorImpl> type =
       new InterceptorTypeImpl<TestDescriptorImpl>(
           provider, "interceptorType", provider.getRootNode());
   type.setDescription("value1");
   type.setDescription("value2");
   type.setDescriptionList("value3", "value4");
   assertTrue(type.getDescriptionList().size() == 4);
   assertEquals(type.getDescriptionList().get(0), "value1");
   assertEquals(type.getDescriptionList().get(1), "value2");
   assertEquals(type.getDescriptionList().get(2), "value3");
   assertEquals(type.getDescriptionList().get(3), "value4");
   type.removeAllDescription();
   assertTrue(type.getDescriptionList().size() == 0);
 }