コード例 #1
0
 @Test
 public void testRedefinitionStrategyIsNotRetransforming() throws Exception {
   Instrumentation instrumentation = mock(Instrumentation.class);
   when(instrumentation.isRedefineClassesSupported()).thenReturn(true);
   assertThat(
       AgentBuilder.RedefinitionStrategy.REDEFINITION.isRetransforming(instrumentation),
       is(false));
 }
コード例 #2
0
 @Test(expected = IllegalArgumentException.class)
 public void testRedefinitionStrategyNotSupportedThrowsException() throws Exception {
   AgentBuilder.RedefinitionStrategy.REDEFINITION.isRetransforming(mock(Instrumentation.class));
 }
コード例 #3
0
 @Test
 public void testRedefinitionStrategyIsEnabled() throws Exception {
   assertThat(AgentBuilder.RedefinitionStrategy.REDEFINITION.isEnabled(), is(true));
 }