use of net.bytebuddy.benchmark.specimen.ExampleClass in project byte-buddy by raphw.
the class ClassByExtensionBenchmarkTest method testByteBuddyWithProxiesClassCreationCachedWithTypePool.
@Test
public void testByteBuddyWithProxiesClassCreationCachedWithTypePool() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithProxyAndReusedDelegatorWithTypePool();
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 testByteBuddyWithAccessorClassCreation.
@Test
public void testByteBuddyWithAccessorClassCreation() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithAccessor();
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 testByteBuddyWithAccessorClassCreationCached.
@Test
public void testByteBuddyWithAccessorClassCreationCached() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithAccessorAndReusedDelegator();
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 testByteBuddyWithPrefixClassCreation.
@Test
public void testByteBuddyWithPrefixClassCreation() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithPrefix();
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 testByteBuddyWithAccessorClassCreationWithTypePool.
@Test
public void testByteBuddyWithAccessorClassCreationWithTypePool() throws Exception {
ExampleClass instance = classByExtensionBenchmark.benchmarkByteBuddyWithAccessorWithTypePool();
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