Esempio n. 1
0
        public void RootCallThisMethodTest()
        {
            var param = new This();
            var f     = _compiler.NewLambda()
                        .WithThis <This>()
                        .Returns <string>()
                        .Compile("CurrentUser");

            f(param).ShouldEqual("user");
        }
Esempio n. 2
0
        public void TypeCallTest()
        {
            var param = new This {
                CurrentUserProperty = "michael"
            };
            var f = _compiler.NewLambda()
                    .WithThis <This>()
                    .Returns <int>()
                    .Compile("CurrentUserProperty.Length");

            f(param).ShouldEqual(7);
        }
Esempio n. 3
0
        public void RootCallThisPropertyTest()
        {
            var param = new This {
                CurrentUserProperty = "michael"
            };
            var f = _compiler.NewLambda()
                    .WithThis <This>()
                    .Returns <string>()
                    .Compile("CurrentUserProperty");

            f(param).ShouldEqual("michael");
        }