Remove unneeded inject statements and rerun test a few times
@@ -89,11 +89,10 @@ public class ComponentGraphTest {
@Test
public void all_created_components_are_returned_in_reverse_topological_order() {
+ for (int i = 0; i < 10; i++) {
Node innerComponent = mockComponentNode(SimpleComponent.class);
Node middleComponent = mockComponentNode(ComponentTakingComponent.class);
Node outerComponent = mockComponentNode(ComponentTakingComponentTakingComponent.class);
- middleComponent.inject(innerComponent);
- outerComponent.inject(innerComponent);
ComponentGraph componentGraph = new ComponentGraph();
componentGraph.add(innerComponent);
@@ -108,6 +107,7 @@ public class ComponentGraphTest {
assertEquals(List.of(outerComponent.constructedInstance().get(), middleComponent.constructedInstance().get(), innerComponent.constructedInstance().get()),
componentGraph.allConstructedComponentsAndProviders());
}
+ }
@Test
public void component_can_be_injected_into_another_component() {
