public IObjectGenerator <T> Invoke(System.Linq.Expressions.Expression <Action <T> > methodExpr) { ObjectMethodInvokeActionAction <T> invoker = new ObjectMethodInvokeActionAction <T>(methodExpr.Compile()); mOverrides.Add(invoker); return(this); }
public void Enact_SetsPropertyWithValue() { ObjectMethodInvokeActionAction<SimpleMethodClass> action = new ObjectMethodInvokeActionAction<SimpleMethodClass>(x => x.SetSomething("Something")); SimpleMethodClass target = new SimpleMethodClass(); action.Enact(null, target); Assert.AreEqual("Something", target.Value); }
public void Enact_SetsPropertyWithValue() { ObjectMethodInvokeActionAction <SimpleMethodClass> action = new ObjectMethodInvokeActionAction <SimpleMethodClass>(x => x.SetSomething("Something")); SimpleMethodClass target = new SimpleMethodClass(); action.Enact(null, target); Assert.AreEqual("Something", target.Value); }