Exemplo n.º 1
0
        public void MappingHelperTestMissingType()
        {
            var source = new MockClassTwo()
            {
                boolType   = true,
                intType    = 2,
                longType   = 100,
                stringType = "string",
                uintType   = 200
            };
            var target = new MockClassTwo();

            MappingHelper.MapMatchingProperties(target, source);
        }
Exemplo n.º 2
0
 public void MappingHelperTestMissingType()
 {
     var source = new MockClassTwo()
     {
         boolType = true,
         intType = 2,
         longType = 100,
         stringType = "string",
         uintType = 200
     };
     var target = new MockClassTwo();
     Assert.Throws(typeof(InvalidCastException), () =>
     {
         MappingHelper.MapMatchingProperties(target, source);
     });
 }
Exemplo n.º 3
0
        public void MappingHelperTestMissingType()
        {
            var source = new MockClassTwo()
            {
                boolType   = true,
                intType    = 2,
                longType   = 100,
                stringType = "string",
                uintType   = 200
            };
            var target = new MockClassTwo();

            Assert.Throws(typeof(InvalidCastException), () =>
            {
                MappingHelper.MapMatchingProperties(target, source);
            });
        }