I'm trying to mock the Microsoft.Practices.EnterpriseLibray.Database object but I can't seem to get it work.
Here's the code I'm trying to mock:
DbCommand command = Database.GetStoredProcCommand("StoredProcedureName");
With the following code:
Mock databaseMock = MockManager.MockAll(typeof(Database));
databaseMock.ExpectAndReturn("GetStoredProcCommand", command).Args("StoredProcedureName");
The result is that I'm getting a static constructor, but GetStoredProcCommand is not expected.