@Test public void adding_behaviour_sets_the_builder_on_the_container() { when(mockBehaviour.transform(mockSpecimenBuilder)).thenReturn(mockSpecimenBuilder); this.behaviours.add(this.mockBehaviour); verify(this.mockBuilderContainer).setFinalBuilder(any(SpecimenBuilder.class)); }
public void add(FixtureBehaviour behaviour) { this.allBehaviours.add(behaviour); this.resetFinalBuilder(); }
FixtureBehaviours implements BehavioursContainer { public void add(FixtureBehaviour behaviour) { this.allBehaviours.add(behaviour); this.resetFinalBuilder(); } }
FixtureBehaviours implements BehavioursContainer { public void add(FixtureBehaviour behaviour) { this.allBehaviours.add(behaviour); this.resetFinalBuilder(); } FixtureBehaviours(FinalBuilderContainer finalBuilderContainer, SpecimenBuilder rootBuilder); }
FixtureBehaviours implements BehavioursContainer { public void add(FixtureBehaviour behaviour) { this.allBehaviours.add(behaviour); this.resetFinalBuilder(); } FixtureBehaviours(FinalBuilderContainer finalBuilderContainer, SpecimenBuilder rootBuilder); void add(FixtureBehaviour behaviour); boolean remove(Class<? extends FixtureBehaviour> classToRemove); T find(Class<T> clazz); }
FixtureBehaviours implements BehavioursContainer { public void add(FixtureBehaviour behaviour) { this.allBehaviours.add(behaviour); this.resetFinalBuilder(); } FixtureBehaviours(FinalBuilderContainer finalBuilderContainer, SpecimenBuilder rootBuilder); void add(FixtureBehaviour behaviour); boolean remove(Class<? extends FixtureBehaviour> classToRemove); T find(Class<T> clazz);  }