use of net.bytebuddy.benchmark.specimen.ExampleClass in project byte-buddy by raphw.
the class ClassByExtensionBenchmarkTest method testByteBuddyWithPrefixClassCreationCachedWithTypePool.
@Test
public void testByteBuddyWithPrefixClassCreationCachedWithTypePool() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithPrefixAndReusedDelegatorWithTypePool();
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 testByteBuddyWithPrefixClassCreationCached.
@Test
public void testByteBuddyWithPrefixClassCreationCached() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithPrefixAndReusedDelegator();
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 testCglibClassCreation.
@Test
public void testCglibClassCreation() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkCglib();
assertThat(instance.getClass(), not(CoreMatchers.<Class<?>>is(ClassByExtensionBenchmark.BASE_CLASS)));
assertThat(instance.getClass().getSuperclass(), CoreMatchers.<Class<?>>is(ClassByExtensionBenchmark.BASE_CLASS));
assertThat(classByExtensionBenchmark.benchmarkCglib().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 testBaseline.
@Test
public void testBaseline() throws Exception {
ExampleClass instance = classByExtensionBenchmark.baseline();
assertThat(instance.getClass(), CoreMatchers.<Class<?>>is(ClassByExtensionBenchmark.BASE_CLASS));
assertReturnValues(instance);
}
use of net.bytebuddy.benchmark.specimen.ExampleClass in project byte-buddy by raphw.
the class ClassByExtensionBenchmarkTest method testByteBuddyWithProxiesClassCreationCached.
@Test
public void testByteBuddyWithProxiesClassCreationCached() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithProxyAndReusedDelegator();
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);
}
Aggregations