예제 #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);
        }
예제 #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);
     });
 }
예제 #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);
            });
        }