示例#1
0
        public void Case5()
        {
            ISampleInterface1 src = new SampleClass1
            {
                Number1 = _fke.Int(1, 1000)
            };
            var dest = new SampleClass2A();

            dest.CopyByNameFrom(src);
            dest.Number1.Should().Be(src.Number1);
        }
示例#2
0
        public void Case6()
        {
            ISampleInterface1 src = new SampleClass1
            {
                ParentInterfaceProp = _fke.Int(1, 1000)
            };
            var dest = new SampleClass2A();

            dest.CopyByNameFrom(src);
            dest.ParentInterfaceProp.Should().Be(src.ParentInterfaceProp);
        }
示例#3
0
        public void Case4()
        {
            var src = new SampleClass1A
            {
                Number1 = _fke.Int(1, 1000)
            };
            var dest = new SampleClass2A();

            dest.CopyByNameFrom(src);
            dest.Number1.Should().Be(src.Number1);
        }