Example #1
0
        public DiscoveryTestBuilder WithCurrentStep(IHastingsMemento currentStep = default,
                                                    bool mock              = false,
                                                    PeerId peer            = default,
                                                    INeighbours neighbours = default)
        {
            if (_careTaker == null)
            {
                WithCareTaker();
            }

            var memento = mock
                ? currentStep ?? DiscoveryHelper.MockMemento(peer, neighbours)
                : currentStep ?? DiscoveryHelper.SubMemento(peer, neighbours);

            _careTaker.Add(memento);

            return(this);
        }