/** * Converts the {@link StepVerifier} to a {@link Subscriber}, leaving all the * lifecycle management to the user. Most notably: * <ul> * <li>no subscription is performed * <li>no {@link VirtualTimeScheduler} is registered in the Schedulers factories * </ul> * <p> * However if a {@link VirtualTimeScheduler} supplier was passed in originally * it will be invoked and the resulting scheduler will be affected by time * manipulation methods. That scheduler can be retrieved from the subscriber's * {@link DefaultVerifySubscriber#virtualTimeScheduler() virtualTimeScheduler()} * method. */ DefaultVerifySubscriber<T> toSubscriber() { VirtualTimeScheduler vts = null; if (parent.vtsLookup != null) { vts = parent.vtsLookup.get(); } return new DefaultVerifySubscriber<>( this.parent.script, this.parent.errorFormatter, this.parent.initialRequest, this.requestedFusionMode, this.expectedFusionMode, this.debugEnabled, this.parent.options.getInitialContext(), vts); }
public void plugHooks(StepVerifierOptions verifierOptions) { plugHooks(); Context userContext = verifierOptions.getInitialContext(); verifierOptions.withInitialContext(Operators.enableOnDiscard(userContext, discardedElements::offer)); }
this.expectedFusionMode, this.debugEnabled, this.parent.options.getInitialContext(), vts);
/** * Converts the {@link StepVerifier} to a {@link Subscriber}, leaving all the * lifecycle management to the user. Most notably: * <ul> * <li>no subscription is performed * <li>no {@link VirtualTimeScheduler} is registered in the Schedulers factories * </ul> * <p> * However if a {@link VirtualTimeScheduler} supplier was passed in originally * it will be invoked and the resulting scheduler will be affected by time * manipulation methods. That scheduler can be retrieved from the subscriber's * {@link DefaultVerifySubscriber#virtualTimeScheduler() virtualTimeScheduler()} * method. */ DefaultVerifySubscriber<T> toSubscriber() { VirtualTimeScheduler vts = null; if (parent.vtsLookup != null) { vts = parent.vtsLookup.get(); } return new DefaultVerifySubscriber<>( this.parent.script, this.parent.errorFormatter, this.parent.initialRequest, this.requestedFusionMode, this.expectedFusionMode, this.debugEnabled, this.parent.options.getInitialContext(), vts); }
public void plugHooks(StepVerifierOptions verifierOptions) { plugHooks(); Context userContext = verifierOptions.getInitialContext(); verifierOptions.withInitialContext(Operators.enableOnDiscard(userContext, discardedElements::offer)); }
this.expectedFusionMode, this.debugEnabled, this.parent.options.getInitialContext(), vts);