Beispiel #1
0
        public void ByTest12()
        {
            var value  = new Test12();
            var values = new Test12[] { value };
            var expect = (Test12[])value.To(typeof(Test12[]));

            Assert.True(values.SequenceEqual(expect));
        }
Beispiel #2
0
        public void ByTest12()
        {
            var value  = new Test12();
            var values = new Test12[] { value };
            var expect = value.To <Test12[]>();

            Assert.True(values.SequenceEqual(expect));
        }
Beispiel #3
0
        public void ByDerived()
        {
            var value = new Test12()
            {
                Property11 = 2,
                Property12 = 4
            };
            var result = value.To <Test11>();
            var expect = new Test11()
            {
                Property11 = 2
            };

            Assert.True(expect.Equals(result));
        }
Beispiel #4
0
        public void BySelf()
        {
            var value = new Test12()
            {
                Property11 = 2,
                Property12 = 4
            };
            var result = value.To <Test12>();
            var expect = new Test12()
            {
                Property11 = 2,
                Property12 = 4
            };

            Assert.True(result.Equals(expect));
        }