Пример #1
0
 public void SetUp()
 {
     _configurationMock = new Mock <IPersistenceConfiguration>();
     _reporterMock      = new Mock <IReporter>();
     _storage           = new CqlStorage(DataContext, _configurationMock.Object, _reporterMock.Object);
     _storage.Start();
 }
Пример #2
0
        public void should_initialize_peer_state_repository_on_start()
        {
            var peerStateRepository = new FakePeerStateRepository();
            var storage             = new CqlStorage(DataContext, peerStateRepository, _configurationMock.Object, _reporterMock.Object);

            storage.Start();

            peerStateRepository.IsInitialized.ShouldBeTrue();
        }
Пример #3
0
        public void should_initialize_peer_state_on_start()
        {
            DataContext.PeerStates.Insert(new CassandraPeerState(new PeerState(new PeerId("New")))).Execute();

            var storage = new CqlStorage(DataContext, _configurationMock.Object, _reporterMock.Object);

            storage.Start();

            storage.GetAllKnownPeers().Count().ShouldEqual(1);
        }