Example #1
0
        public void When_CastTo_called_with_null_as_example_Null_variable_type_is_used()
        {
            object obj     = new Random();
            Random example = null;

            Assert.That(Change.CastTo(obj, example), Is.EqualTo(obj));
        }
Example #2
0
 public void When_CastTo_called_with_mismatched_types_Exception_is_thrown()
 {
     Assert.Throws <InvalidCastException>(() => Change.CastTo(new Random(), new List()));
 }