public void CallMethodAction() { var c = new TestCallMethodAction(); var item = new ActionItem(); c.TargetObject = item; c.MethodName = "Method1"; c.TestInvoke(); Assert.AreEqual(true, item.IsMethod1Invoked); }
public void CallMethodAction_With_Int_Parameter() { var c = new TestCallMethodAction(); var item = new GenericActionItem <int>(); c.TargetObject = item; c.MethodName = "Method1"; c.Parameter = 10; c.TestInvoke(); Assert.AreEqual(true, item.IsMethod1Invoked); Assert.AreEqual(10, item.Method1Parameter); }
public void CallMethodAction_With_String_Parameter() { var c = new TestCallMethodAction(); var item = new ActionItem(); c.TargetObject = item; c.MethodName = "Method2"; c.Parameter = "My parameter"; c.TestInvoke(); Assert.AreEqual(true, item.IsMethod2Invoked); Assert.AreEqual("My parameter", item.Method2Parameter); }
public void CallMethodAction_With_DateTime_Parameter() { var c = new TestCallMethodAction(); var item = new GenericActionItem <DateTime>(); var date = new DateTime(2019, 07, 18); c.TargetObject = item; c.MethodName = "Method1"; c.Parameter = date; c.TestInvoke(); Assert.AreEqual(true, item.IsMethod1Invoked); Assert.AreEqual(date, item.Method1Parameter); }
public void Change_CallMethodAction_Properties() { var c = new TestCallMethodAction(); var item = new ActionItem(); c.TargetObject = item; c.MethodName = "Method1"; c.TestInvoke(); Assert.AreEqual(true, item.IsMethod1Invoked); c.MethodName = "Method2"; c.Parameter = "My parameter"; c.TestInvoke(); Assert.AreEqual(true, item.IsMethod2Invoked); Assert.AreEqual("My parameter", item.Method2Parameter); }