Exemple #1
0
        public void AccessPublicPropertyOnAStruct()
        {
            TheStruct myStruct = new TheStruct {
                PublicProperty = 22
            };

            TestPropertyValue <TheStruct, int> propValue = new TestPropertyValue <TheStruct, int> {
                Operand = myStruct, PropertyName = "PublicProperty"
            };

            TestSequence seq = TestExpressionTracer.GetTraceablePropertyValue <TheStruct, int>(propValue, myStruct.PublicProperty.ToString());

            TestRuntime.RunAndValidateWorkflow(seq);
        }
Exemple #2
0
        public void AccessPublicPropertyOnAnObject()
        {
            TestPropertyValue <PublicType, int> propertyValue = new TestPropertyValue <PublicType, int>
            {
                OperandExpression = context => new PublicType()
                {
                    PublicProperty = 10
                },
                PropertyName = "PublicProperty",
            };

            TestSequence seq = TestExpressionTracer.GetTraceablePropertyValue <PublicType, int>(propertyValue, "10");

            TestRuntime.RunAndValidateWorkflow(seq);
        }
Exemple #3
0
        public void AccessStaticPropertyOnAnObject()
        {
            TestPropertyValue <PublicType, int> propertyValue = new TestPropertyValue <PublicType, int> {
                PropertyName = "StaticProperty"
            };
            TestSequence seq = new TestSequence()
            {
                Activities =
                {
                    new TestAssign <int>
                    {
                        ToLocation = new TestPropertyReference <PublicType, int>{
                            PropertyName = "StaticProperty"
                        },
                        Value = 10
                    },
                    TestExpressionTracer.GetTraceablePropertyValue <PublicType, int>(propertyValue, "10")
                }
            };

            TestRuntime.RunAndValidateWorkflow(seq);
        }