public void Can_ask_for_block_signer()
        {
            ISnapshotManager snapshotManager = Substitute.For <ISnapshotManager>();
            IBlockFinder     blockFinder     = Substitute.For <IBlockFinder>();
            BlockHeader      header          = Build.A.BlockHeader.TestObject;

            blockFinder.FindHeader(Arg.Any <Keccak>()).Returns(header);
            snapshotManager.GetBlockSealer(header).Returns(TestItem.AddressA);
            CliqueRpcModule module = new CliqueRpcModule(Substitute.For <ICliqueBlockProducer>(), snapshotManager, blockFinder);

            module.clique_getBlockSigner(Keccak.Zero).Result.ResultType.Should().Be(ResultType.Success);
            module.clique_getBlockSigner(Keccak.Zero).Data.Should().Be(TestItem.AddressA);
        }
        public void Can_ask_for_block_signer_when_hash_is_null()
        {
            ISnapshotManager snapshotManager = Substitute.For <ISnapshotManager>();
            IBlockFinder     blockFinder     = Substitute.For <IBlockFinder>();
            CliqueRpcModule  module          = new CliqueRpcModule(Substitute.For <ICliqueBlockProducer>(), snapshotManager, blockFinder);

            module.clique_getBlockSigner(null).Result.ResultType.Should().Be(ResultType.Failure);
        }
        public void Can_ask_for_block_signer_when_block_is_unknown()
        {
            ISnapshotManager snapshotManager = Substitute.For <ISnapshotManager>();
            IBlockFinder     blockFinder     = Substitute.For <IBlockFinder>();

            blockFinder.FindHeader(Arg.Any <Keccak>()).Returns((BlockHeader)null);
            CliqueRpcModule module = new CliqueRpcModule(Substitute.For <ICliqueBlockProducer>(), snapshotManager, blockFinder);

            module.clique_getBlockSigner(Keccak.Zero).Result.ResultType.Should().Be(ResultType.Failure);
        }