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