public static T Returns <T>(this T obj, T valueToReturn) { SubstituteContext.RegisterBehaviour( new ReturnsMethodBehaviour(valueToReturn)); return(default(T)); }
public static T Throws <T>(this T returnedValue, Exception exceptionToThrow) { SubstituteContext.RegisterBehaviour( new ThrowsMethodBehaviour(exceptionToThrow)); return(default(T)); }
public static void Do <T>(this T returnedValue, Func <object[], T> callback) { SubstituteContext.RegisterBehaviour( new DoMethodBehaviour <T>(callback)); }