use of net.bytebuddy.benchmark.specimen.ExampleClass in project byte-buddy by raphw.
the class ClassByExtensionBenchmarkTest method testByteBuddyWithAccessorClassCreationCachedWithTypePool.
@Test
public void testByteBuddyWithAccessorClassCreationCachedWithTypePool() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithAccessorAndReusedDelegatorWithTypePool();
assertThat(instance.getClass(), not(CoreMatchers.<Class<?>>is(ClassByExtensionBenchmark.BASE_CLASS)));
assertThat(instance.getClass().getSuperclass(), CoreMatchers.<Class<?>>is(ClassByExtensionBenchmark.BASE_CLASS));
assertThat(classByExtensionBenchmark.benchmarkByteBuddyWithProxy().getClass(), not(CoreMatchers.<Class<?>>is(instance.getClass())));
assertReturnValues(instance);
}
use of net.bytebuddy.benchmark.specimen.ExampleClass in project byte-buddy by raphw.
the class ClassByExtensionBenchmarkTest method testJavassistClassCreation.
@Test
public void testJavassistClassCreation() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkJavassist();
assertThat(instance.getClass(), not(CoreMatchers.<Class<?>>is(ClassByExtensionBenchmark.BASE_CLASS)));
assertThat(instance.getClass().getSuperclass(), CoreMatchers.<Class<?>>is(ClassByExtensionBenchmark.BASE_CLASS));
assertThat(classByExtensionBenchmark.benchmarkJavassist().getClass(), not(CoreMatchers.<Class<?>>is(instance.getClass())));
assertReturnValues(instance);
}
Aggregations