Code to reproduce this:
public class Thing { }
public abstract class Thing<T> : Thing where T : class
{
public abstract Thing<TTarget> As<TTarget>() where TTarget : class;
}
var expectations = Rock.Create<Thing<object>>
This is because the As<TInterface> method has a constraint on it, but when the MethodExpectations<> extension method is made for As<TInterface>, the constraints aren't there. I need to copy the constraints from a member into the extension methods.
Code to reproduce this:
This is because the
As<TInterface>method has a constraint on it, but when theMethodExpectations<>extension method is made forAs<TInterface>, the constraints aren't there. I need to copy the constraints from a member into the extension methods.