public void TestHash256ContractParameterSuccess() { var uint256 = new UInt256(); var mockBuilder = new Mock <ScriptBuilder>(); var item = mockBuilder.Object; var uint256ContractParameter = new Hash256ContractParameter(uint256); uint256ContractParameter.PushIntoScriptBuilder(item); mockBuilder.Verify(m => m.EmitPush(It.Is <byte[]>(b => b.SequenceEqual(uint256.ToArray())))); }
public void TestHash256ContractParameterUnsuccess() { var uint256 = new UInt256(); var notExpectedValue = new UInt256(Crypto.Default.GenerateRandomBytes(32)); var mockBuilder = new Mock <ScriptBuilder>(); var item = mockBuilder.Object; var uint256ContractParameter = new Hash256ContractParameter(uint256); uint256ContractParameter.PushIntoScriptBuilder(item); mockBuilder.Verify(m => m.EmitPush(It.Is <byte[]>(b => b.SequenceEqual(notExpectedValue.ToArray())))); }