@Test
@SpecAssertions({ @SpecAssertion(section = "5.5.7", id = "caa"), @SpecAssertion(section = "5.5.7", id = "cba"),
@SpecAssertion(section = "5.5.7", id = "cca") })
public void testInjectionPointGetMember() {
Member fieldMember = bar.getFoo().getInjectionPoint().getMember();
assertNotNull(fieldMember);
assertTrue(fieldMember instanceof Field);
Field field = (Field) fieldMember;
assertEquals(field.getName(), "fooInstance");
assertEquals(field.getType(), Instance.class);
assertEquals(field.getDeclaringClass(), Bar.class);
Member methodMember = bar.getInitializerFoo().getInjectionPoint().getMember();
assertNotNull(methodMember);
assertTrue(methodMember instanceof Method);
Method method = (Method) methodMember;
assertEquals(method.getName(), "setInitializerInjectionFooInstance");
assertEquals(method.getParameterTypes().length, 1);
assertEquals(method.getDeclaringClass(), Bar.class);
Member constructorMember = bar.getConstructorInjectionFoo().getInjectionPoint().getMember();
assertNotNull(constructorMember);
assertTrue(constructorMember instanceof Constructor);
Constructor<?> constructor = (Constructor<?>) constructorMember;
// See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294399
assertTrue("org.jboss.cdi.tck.tests.lookup.injectionpoint.dynamic.Bar".equals(constructor.getName())