@Override public void customise(JFixture fixture) { fixture.behaviours().add(new TransformingBehaviour<T>(classToIntercept, transformer)); } }
@Override public void customise(JFixture fixture) { fixture.behaviours().add(new InterceptBehaviour<T>(classToIntercept, interceptor)); } }
@Override public void customise(JFixture fixture) { if (fixture.behaviours().find(AutoPropertyBehaviour.class) == null) { fixture.behaviours().add(new AutoPropertyBehaviour()); } } }
@Override public void customise(JFixture fixture) { fixture.behaviours().remove(IgnoreNoResolutionBehaviour.class); fixture.behaviours().add(new ThrowOnNoResolutionBehaviour()); } }
@Override public void customise(JFixture fixture) { TracingBehaviour behaviour = new TracingBehaviour(new DebugTracingStrategy(), this.traceWriter); fixture.behaviours().add(behaviour); } }
@Override public void customise(JFixture fixture) { fixture.behaviours().remove(ThrowingRecursionBehaviour.class); OmitSpecimenRecursionBehaviour behaviour = new OmitSpecimenRecursionBehaviour(); fixture.behaviours().add(behaviour); } }
@Override public void customise(JFixture fixture) { fixture.behaviours().remove(ThrowOnNoResolutionBehaviour.class); fixture.behaviours().add(new IgnoreNoResolutionBehaviour()); } }
@Override public void customise(JFixture fixture) { fixture.behaviours().remove(OmitSpecimenRecursionBehaviour.class); ThrowingRecursionBehaviour behaviour = new ThrowingRecursionBehaviour(); fixture.behaviours().add(behaviour); } }
private void initialiseAllFixturesInTestClass() throws Throwable { StringBuilder sb = new StringBuilder(); try { fixture.behaviours().add(new TracingBehaviour(new MemberOnlyResponseStrategy(), sb)); FixtureAnnotations.initFixtures(target, fixture); base.evaluate(); } catch (Throwable t) { failed(t, sb); throw t; } }
private void applyDefaultCustomisations() { this.customise(new AutoPropertyCustomisation()); this.customise(new ThrowingRecursionCustomisation()); this.customise(new ThrowOnNoResolutionCustomisation()); this.behaviours().add(new SpecimenTypeInjectorBehaviour()); } }