Exemple #1
0
        public void ExecuteMethodStepWithDelegateWithContext()
        {
            WxeMethodStep methodStepWithContext = new WxeMethodStep(_function.PublicStepMethodWithContext);

            methodStepWithContext.Execute(CurrentWxeContext);

            Assert.That(_function.LastExecutedStepID, Is.EqualTo("2"));
            Assert.That(_function.WxeContextStep2, Is.SameAs(CurrentWxeContext));
        }
Exemple #2
0
        public void ExecuteMethodStep()
        {
            Type          functionType = typeof(TestFunction);
            MethodInfo    step1        = functionType.GetMethod("Step1", BindingFlags.Instance | BindingFlags.NonPublic);
            WxeMethodStep methodStep   = new WxeMethodStep(_function, step1);

            methodStep.Execute(CurrentWxeContext);

            Assert.That(_function.LastExecutedStepID, Is.EqualTo("1"));
        }
Exemple #3
0
        public void ExecuteMethodStepWithDelegate()
        {
            WxeMethodStep methodStep = new WxeMethodStep(_function.PublicStepMethod);

            Assert.That(_function.LastExecutedStepID, Is.Not.EqualTo("1"));

            methodStep.Execute(CurrentWxeContext);

            Assert.That(_function.LastExecutedStepID, Is.EqualTo("1"));
        }
Exemple #4
0
        public void ExecuteMethodStepWithContext()
        {
            Type          functionType          = typeof(TestFunction);
            MethodInfo    step2                 = functionType.GetMethod("Step2", BindingFlags.Instance | BindingFlags.NonPublic);
            WxeMethodStep methodStepWithContext = new WxeMethodStep(_function, step2);

            methodStepWithContext.Execute(CurrentWxeContext);

            Assert.That(_function.LastExecutedStepID, Is.EqualTo("2"));
            Assert.That(_function.WxeContextStep2, Is.SameAs(CurrentWxeContext));
        }