Example #1
0
 public BlackBoxTestStage(TestEnvironment environment, SubscriberBlackboxVerification <T> verification, bool runDefaultInit = true) : base(environment)
 {
     _verification = verification;
     if (runDefaultInit)
     {
         Publisher = CreateHelperPublisher(long.MaxValue);
         Tees      = Environment.NewManualSubscriber(Publisher);
         var subscriber = verification.CreateSubscriber();
         SubscriberProxy = CreateBlackboxSubscriberProxy(Environment, subscriber);
         Subscribe(SubscriberProxy);
     }
 }
Example #2
0
 public WhiteboxTestStage(TestEnvironment environment, SubscriberWhiteboxVerification <T> verification, bool runDefaultInit = true) : base(environment)
 {
     _verification = verification;
     if (runDefaultInit)
     {
         Publisher = CreateHelperPublisher(long.MaxValue);
         Tees      = Environment.NewManualSubscriber(Publisher);
         Probe     = new WhiteboxSubscriberProbe <T>(Environment, Subscriber);
         Subscribe(verification.CreateSubscriber(Probe));
         Probe.Puppet.ExpectCompletion(environment.DefaultTimeoutMilliseconds,
                                       $"Subscriber {Sub} did not call `RegisterOnSubscribe`");
     }
 }