public void can_cast_if_a_target_method_is_missing_but_throwing_not_implemented_exception_is_required() { var target = new TargetBad(); var proxy = Mock.Cast <ISimplist>(target); Assert.Throws <NotImplementedException>(() => proxy.Execute()); }
public void cannot_cast_if_a_target_method_is_missing() { var target = new TargetBad(); Assert.Throws <InvalidCastException>(() => Duck.Cast <ISimplist>(target)); }