public async Task HeaderInfoServerTest() { _headers = new List <IBlockHeader> { MockBlockHeader().Object, MockBlockHeader().Object, MockBlockHeader().Object }; _requestIndexedInfoList = new List <RequestBlockInfo> { new RequestBlockInfo { NextHeight = 0 }, new RequestBlockInfo { NextHeight = 1 }, new RequestBlockInfo { NextHeight = 2 } }; var headerInfoServer = new SideChainBlockInfoRpcServerImpl(MockChainService().Object, _logger); var chainId = Hash.Generate(); headerInfoServer.Init(chainId); await headerInfoServer.IndexDuplexStreaming(MockRequestStream(_requestIndexedInfoList.Count).Object, MockResponseStream().Object, null); Assert.Equal(_requestIndexedInfoList.Count, _requestIndexedInfoList.Count); }
public ServerManager ServerManager(ParentChainBlockInfoRpcServerImpl impl1, SideChainBlockInfoRpcServerImpl impl2) { return(new ServerManager(impl1, impl2, _logger)); }