예제 #1
0
        public void ConvertToWorksForUpcast()
        {
            var result   = LanguagePrimitives.ConvertTo((TestParent) new TestChild("foo", "bar"), typeof(TestChild));
            var expected = new TestChild("FOO", "bar");

            Assert.AreEqual(expected.GetType(), result.GetType());
            Assert.AreEqual(expected, result);
        }
예제 #2
0
 public void ConvertToWorksForUpcast()
 {
     var result = LanguagePrimitives.ConvertTo((TestParent) new TestChild("foo", "bar"), typeof(TestChild));
     var expected = new TestChild("FOO", "bar");
     Assert.AreEqual(expected.GetType(), result.GetType());
     Assert.AreEqual(expected, result);
 }