コード例 #1
0
        public void TestInvokeContractNull()
        {
            var scriptHash          = new UInt160();
            var nullExecutionEngine = new NullExecutionEngine();
            var stackItemStackMock  = new NullStack();

            nullExecutionEngine.PublicStackItemsStack = stackItemStackMock;

            var invocationProcess = new InvocationProcess(nullExecutionEngine);

            var invocationResult = invocationProcess.Invoke(scriptHash, null);

            Assert.IsNotNull(invocationResult);
        }
コード例 #2
0
        public void TestInvokeScriptNull()
        {
            var nullExecutionEngine = new NullExecutionEngine();
            var stackItemStackMock  = new NullStack();

            nullExecutionEngine.PublicStackItemsStack = stackItemStackMock;

            var invocationProcess  = new InvocationProcess(nullExecutionEngine);
            var intParameter       = new IntegerContractParameter(1);
            var contractParameters = new ContractParameter[] { intParameter };

            var invocationResult = invocationProcess.Invoke(null, contractParameters);

            Assert.IsNotNull(invocationResult);
        }