assertEquals("FamixInvocation relationships from " + caller.getUniqueName() + " to " + callee.getUniqueName(), 1, nrContainsInvocation);
}
@Test
public void testUndefClassInstanceCreation() {
FamixMethod caller = (FamixMethod) fModel.getElement(fFactory.createMethod("testPackage.UnresolvedCalls.undefClassInstanceCreation()", null));
FamixMethod calleeClassKnown = (FamixMethod) fModel.getElement(fFactory.createMethod("testPackage.Dummy.<init>()", null));
FamixMethod calleeClassKnownParamUnkown = (FamixMethod) fModel.getElement(fFactory.createMethod("testPackage.Dummy.<init>(<undef>.NotDef)", null));
FamixMethod calleeClassUnknown = (FamixMethod) fModel.getElement(fFactory.createMethod("<undef>.NotDef.<init>()", null));
FamixMethod calleeClassUnknownParamUnkown = (FamixMethod) fModel.getElement(fFactory.createMethod("<undef>.NotDef.<init>(<undef>.NotDef)", null));
assertNotNull("Caller method testPackage.UnresolvedCalls.undefClassInstanceCreation() must exist", caller);
assertNotNull("Callee method testPackage.Dummy.<init>() must exist", calleeClassKnown);
assertNotNull("Callee method testPackage.Dummy.<init>(<undef>.NotDef) must exist", calleeClassKnownParamUnkown);
assertNotNull("Callee method <undef>.NotDef.<init>() must exist", calleeClassUnknown);
assertNotNull("Callee method <undef>.NotDef.<init>(<undef>.NotDef) must exist", calleeClassUnknownParamUnkown);
Set<FamixAssociation> lRelations = fModel.getAssociations(caller);
int nrContainsInvocation = TestHelper.containsRelationTo(calleeClassKnown, lRelations);
assertEquals("FamixInvocation relationships from " + caller.getUniqueName() + " to " + calleeClassKnown.getUniqueName(), 1, nrContainsInvocation);
nrContainsInvocation = TestHelper.containsRelationTo(calleeClassKnownParamUnkown, lRelations);
assertEquals("FamixInvocation relationships from " + caller.getUniqueName() + " to " + calleeClassKnownParamUnkown.getUniqueName(), 1, nrContainsInvocation);
nrContainsInvocation = TestHelper.containsRelationTo(calleeClassUnknown, lRelations);
assertEquals("FamixInvocation relationships from " + caller.getUniqueName() + " to " + calleeClassUnknown.getUniqueName(), 1, nrContainsInvocation);
nrContainsInvocation = TestHelper.containsRelationTo(calleeClassUnknownParamUnkown, lRelations);
assertEquals("FamixInvocation relationships from " + caller.getUniqueName() + " to " + calleeClassUnknownParamUnkown.getUniqueName(), 1, nrContainsInvocation);
}