Exemplo n.º 1
0
        public void can_compile_setter()
        {
            var message = "Success!";
            var sample  = new SampleClass {
                Message = "Failed!"
            };

            var func = FuncBuilder.CompileSetter(sample.GetType().GetProperty("Message")).As <Action <SampleClass, string> >();

            func(sample, message);
            sample.Message.ShouldBe(message);
        }