Beispiel #1
0
        public void MappingHelperTest()
        {
            var source = new MockClassOne
            {
                boolType = true,
                intType = 2,
                longType = 100,
                stringType = "string"
            };
            var target = new MockClassOne();

            MappingHelper.MapMatchingProperties(target, source);

            Assert.That(target.boolType, Is.EqualTo(source.boolType));
            Assert.That(target.stringType, Is.EqualTo(source.stringType));
            Assert.That(target.longType, Is.EqualTo(source.longType));
            Assert.That(target.intType, Is.EqualTo(source.intType));
        }
Beispiel #2
0
        public void MappingHelperTest()
        {
            var source = new MockClassOne
            {
                boolType   = true,
                intType    = 2,
                longType   = 100,
                stringType = "string"
            };
            var target = new MockClassOne();

            MappingHelper.MapMatchingProperties(target, source);


            Assert.That(target.boolType, Is.EqualTo(source.boolType));
            Assert.That(target.stringType, Is.EqualTo(source.stringType));
            Assert.That(target.longType, Is.EqualTo(source.longType));
            Assert.That(target.intType, Is.EqualTo(source.intType));
        }