public void RootCallThisMethodTest() { var param = new This(); var f = _compiler.NewLambda() .WithThis <This>() .Returns <string>() .Compile("CurrentUser"); f(param).ShouldEqual("user"); }
public void TypeCallTest() { var param = new This { CurrentUserProperty = "michael" }; var f = _compiler.NewLambda() .WithThis <This>() .Returns <int>() .Compile("CurrentUserProperty.Length"); f(param).ShouldEqual(7); }
public void RootCallThisPropertyTest() { var param = new This { CurrentUserProperty = "michael" }; var f = _compiler.NewLambda() .WithThis <This>() .Returns <string>() .Compile("CurrentUserProperty"); f(param).ShouldEqual("michael"); }