@Override public void customise(JFixture fixture) { AutoPropertyBehaviour apb = fixture.behaviours().find(AutoPropertyBehaviour.class); if (apb == null) return; apb.specifications().add(this.specification); } }
@Override public void customise(JFixture fixture) { fixture.behaviours().add(new TransformingBehaviour<T>(classToIntercept, transformer)); } }
@Override public void customise(JFixture fixture) { AutoPropertyBehaviour autoPropertyBehaviour = fixture.behaviours().find(AutoPropertyBehaviour.class); if(autoPropertyBehaviour == null) return; autoPropertyBehaviour.specifications().add(new MockitoAutoPropertySpecification()); fixture.addBuilderToEndOfPipeline(new MockitoRelay()); } }
@Override public void customise(JFixture fixture) { fixture.behaviours().add(new InterceptBehaviour<T>(classToIntercept, interceptor)); } }
@Override public void customise(JFixture fixture) { AutoPropertyBehaviour autoPropertyBehaviour = fixture.behaviours().find(AutoPropertyBehaviour.class); if (autoPropertyBehaviour != null) { autoPropertyBehaviour.specifications().add(new JodaTimeSpecification()); } fixture.addBuilderToStartOfPipeline(new ReadableInstantRelay()); fixture.addBuilderToStartOfPipeline(new ReadableIntervalRelay()); fixture.addBuilderToStartOfPipeline(new ReadableDurationRelay()); fixture.addBuilderToStartOfPipeline(new ReadablePartialRelay()); fixture.addBuilderToStartOfPipeline(new ReadablePeriodRelay()); fixture.addBuilderToStartOfPipeline(new PartialRelay()); fixture.addBuilderToStartOfPipeline(new BasePeriodRelay()); fixture.addBuilderToStartOfPipeline(new BaseSingleFieldPeriodRelay()); fixture.addBuilderToStartOfPipeline(new BasePartialRelay()); fixture.addBuilderToStartOfPipeline(new BaseLocalRelay()); fixture.addBuilderToStartOfPipeline(new BaseDurationRelay()); fixture.addBuilderToStartOfPipeline(new BaseIntervalRelay()); fixture.addBuilderToStartOfPipeline(new BaseDateTimeRelay()); fixture.addBuilderToStartOfPipeline(new DateTimeZoneBuilder()); fixture.addBuilderToStartOfPipeline(new ChronologyBuilder()); fixture.addBuilderToStartOfPipeline(new ChronologyBuilder()); } }
@Override public void customise(JFixture fixture) { TracingBehaviour behaviour = new TracingBehaviour(new DebugTracingStrategy(), this.traceWriter); 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()); } }