Пример #1
0
        public void TestProtobufState()
        {
            var input = new CustomContract.ProtobufInput
            {
                ProtobufValue = new CustomContract.ProtobufMessage
                {
                    BoolValue   = true,
                    Int64Value  = 128,
                    StringValue = "test"
                }
            };

            var output = Contract.TestProtobufState(input);

            output.ProtobufValue.BoolValue.ShouldBeTrue();
            output.ProtobufValue.Int64Value.ShouldBe(128);
            output.ProtobufValue.StringValue.ShouldBe("test");
        }
Пример #2
0
        public void TestMappedState()
        {
            var input = new CustomContract.ProtobufInput
            {
                ProtobufValue = new CustomContract.ProtobufMessage
                {
                    BoolValue   = false,
                    Int64Value  = 100,
                    StringValue = "test"
                }
            };

            var output = Contract.TestMappedState(input);

            output.Collection.Count.ShouldBe(1);
            output.Collection[0].BoolValue.ShouldBeFalse();
            output.Collection[0].Int64Value.ShouldBe(100);
            output.Collection[0].StringValue.ShouldBe("test");
        }