Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }