Ejemplo n.º 1
0
        /// <summary>
        /// Initialize mock objects.
        /// </summary>
        public PoolTests()
        {
            // factory mockup.
            _objectFactory = Substitute.For <IObjectFactory>();

            // config-manager mockup
            _configManager = Substitute.For <IConfigManager>();

            // pool-config mockup.
            _config = Substitute.For <IPoolConfig>();
            _config.Daemon.Valid.Returns(true);

            // daemon client mockup.
            _daemonClient = _objectFactory.GetDaemonClient(_config.Daemon, _config.Coin);
            _daemonClient.GetInfo().Returns(new Info());
            _daemonClient.GetBlockChainInfo().Returns(new Info());
            _daemonClient.GetNetworkInfo().Returns(new Info());
            _daemonClient.GetWalletInfo().Returns(new Info());
            _daemonClient.GetMiningInfo().Returns(new MiningInfo());
        }