public void OnNextCoreProcessesOnTheWalletSyncManager()
        {
            var           walletSyncManager = new Mock <IWalletSyncManager>();
            BlockObserver observer          = new BlockObserver(walletSyncManager.Object);
            Block         block             = new Block();

            observer.OnNext(block);

            walletSyncManager.Verify(w => w.ProcessBlock(block), Times.Exactly(1));
        }
        public void OnNextCoreProcessesOnTheWalletSyncManager()
        {
            var walletSyncManager = new Mock <IWalletSyncManager>();
            var observer          = new BlockObserver(walletSyncManager.Object);
            var block             = Network.StratisMain.CreateBlock();

            observer.OnNext(block);

            walletSyncManager.Verify(w => w.ProcessBlock(block), Times.Exactly(1));
        }
예제 #3
0
        public void OnNextCoreProcessesOnTheWalletSyncManager()
        {
            var           walletSyncManager  = new Mock <IWalletSyncManager>();
            var           observer           = new BlockObserver(walletSyncManager.Object);
            Block         block              = KnownNetworks.StratisMain.CreateBlock();
            ChainedHeader header             = ChainedHeadersHelper.CreateGenesisChainedHeader();
            var           chainedHeaderBlock = new ChainedHeaderBlock(block, header);

            observer.OnNext(chainedHeaderBlock);

            walletSyncManager.Verify(w => w.ProcessBlock(block), Times.Exactly(1));
        }