public void ShouldMapFromAnInterface()
        {
            IPublicInterface <string> source = new PublicImplementation <string>
            {
                Value = "Interfaces!"
            };

            var result = Mapper.Map(source).ToANew <PublicField <string> >();

            result.Value.ShouldBe("Interfaces!");
        }
Exemple #2
0
        public void ShouldMapOnToInterface()
        {
            var source = new PublicImplementation <string> {
                Value = "Interface! :o"
            };
            IPublicInterface <string> target = new PublicImplementation <string>();

            Mapper.Map(source).OnTo(target);

            target.Value.ShouldBe("Interface! :o");
        }