public static IHastingsOriginator MockOriginator(PeerId peer = default, INeighbours neighbours = default) { var memento = new HastingsMemento(peer, neighbours); return(new HastingsOriginator(memento)); }
public void Can_Init_Memento_With_Existing_Params() { var neighbours = DiscoveryHelper.MockNeighbours(); var memento = new HastingsMemento(_peer, neighbours); memento.Peer.Should().Be(_peer); memento.Neighbours.Should().Contain(neighbours); memento.Neighbours.Should().HaveCount(Constants.NumberOfRandomPeers); }