public void Cant_Store_Peer_During_Burn_In() { var discoveryTestBuilder = new DiscoveryTestBuilder() .WithLogger() .WithScheduler(_testScheduler) .WithPeerRepository() .WithDns() .WithPeerSettings() .WithPeerClient() .WithCancellationProvider() .WithPeerClientObservables() .WithStepProposal() .WithCurrentStep() .WithAutoStart() .WithBurn(10); using (var walker = discoveryTestBuilder.Build()) { walker.GetBurnInValue() .Should() .Be(10); walker.TestStorePeer(Substitute.For <INeighbour>()); walker.PeerRepository .Received(0) .Add(Arg.Any <Peer>()); } }
public void Can_WalkForward_With_Valid_Candidate() { var knownStepPid = PeerIdHelper.GetPeerId("hey_its_jimmys_brother_the_guy_with_the_beautiful_voice"); var knownNextCandidate = PeerIdHelper.GetPeerId("these_eyes...."); var discoveryTestBuilder = new DiscoveryTestBuilder() .WithLogger() .WithScheduler(_testScheduler) .WithPeerRepository() .WithDns() .WithPeerSettings() .WithPeerClient() .WithCancellationProvider() .WithPeerClientObservables() .WithCurrentStep(default, true, knownStepPid)