private void assertProperty(YanException e, int i, Class c, Object k){
final Stack trace = e.getResolutionTrace();
assertEquals(new PropertyEntry(c, k), trace.get(i));
}
public void testVerifyCyclicDependencyThrowsCyclicDependencyException() {
DefaultContainer yan = new DefaultContainer();
yan.registerConstructor(ComponentB.class);
yan.registerConstructor(ComponentD.class);
yan.registerConstructor(ComponentE.class);
try {
yan.verify();
fail("CyclicDependencyException expected");
} catch (jfun.yan.CyclicDependencyException e) {
assertEquals(3, e.getResolutionTrace().size());
assertParameter(e, 0, ComponentE.class, 0);
assertParameter(e, 1, ComponentD.class, 0);