MCPcopy Create free account
hub / github.com/ReadyTalk/avian / testProxyDefaultValue

Method testProxyDefaultValue

test/Annotations.java:48–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 }
47
48 private static void testProxyDefaultValue() {
49 ClassLoader loader = Annotations.class.getClassLoader();
50 InvocationHandler handler = new InvocationHandler() {
51 public Object invoke(Object proxy, Method method, Object... args) {
52 return method.getDefaultValue();
53 }
54 };
55 Test test = (Test)
56 Proxy.newProxyInstance(loader, new Class[] { Test.class }, handler);
57 expect("Hello, world!".equals(test.value()));
58 }
59
60 private interface World {
61 @TestComplex(arrayValue = { @Test, @Test(value = "7/9") },

Callers 1

mainMethod · 0.95

Calls 5

newProxyInstanceMethod · 0.95
expectMethod · 0.95
getClassLoaderMethod · 0.80
equalsMethod · 0.65
valueMethod · 0.45

Tested by

no test coverage detected