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)); }
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")); }
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")); }
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)); }