예제 #1
0
        public void it_should_map_props_of_same_name()
        {
            var src = new SimpleSource()
            {
                Name = "mikey"
            };
            var cfg = new DestinationConfiguration(typeof(SimpleDestination));

            cfg.From(typeof(SimpleSource));

            var executable = cfg.ToExecutable(src.GetType());
            var mapper     = new DefaultMapCommand(executable, new TestContextualizer());
            var output     = (SimpleDestination)mapper.From(src);

            output.Name.should_be_equal_to("mikey");
        }
예제 #2
0
        public void it_should_map_props_of_same_name()
        {
            var src = new SimpleSource() {Name = "mikey"};
            var cfg = new DestinationConfiguration(typeof(SimpleDestination));
            cfg.From(typeof (SimpleSource));

            var executable = cfg.ToExecutable(src.GetType());
            var mapper = new DefaultMapCommand(executable,new TestContextualizer());
            var output = (SimpleDestination) mapper.From(src);
            output.Name.should_be_equal_to("mikey");
        }