Ejemplo n.º 1
0
        public static IHastingsOriginator MockOriginator(PeerId peer            = default,
                                                         INeighbours neighbours = default)
        {
            var memento = new HastingsMemento(peer, neighbours);

            return(new HastingsOriginator(memento));
        }
Ejemplo n.º 2
0
        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);
        }