I've got a SqlLayer class I'm trying to Mock that has a GetDataReader method that accepts a string query and an IEnumerable of SqlParameters. I've tried stubbing out the method call like this:
var parameters = new SqlParameter[] {}
mockSqlLayer.Stub(x => x.GetDataReader(spaceConsumedQuery, parameters)).Return(MockDataReader());
But the test is returning a NullReferenceException, I assume because the signature isn't resolving correctly, and can't find the stub. The method signature I'm trying to call looks like this:
public IDataReader GetDataReader(string commandText, IEnumerable<SqlParameter> parameters)