Hi!

I got an object of IDataReader. Need to make some changes to the result of 
its GetSchemaTable method. And want the object to act like it acts usual in 
all other cases. Can I somehow wrap that existing object using rhino mocks?


Details:
in out unit tests we create DataTable programmatically, then provide a code 
to be tested with result of its "CreateDataReader()" method, which returns 
IDataReader.
I didn't find way to set precision and scale for a decimal column of 
DataTable. As far as I see the only way to emulate them is to create a 
wrapper around the IDataReader object which wil delegate all actions , but 
will allow to make changes to schema info table inside GetSchemaTable


I can achive such wrapping manually: make a StubDataReader class, which 
will delegate all calls to an existing instance of IDataReader. But I think 
a new class with about 20 stub methods is not a good way :(

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rhinomocks/-/wm_WLyuS52IJ.
To post to this group, send email to rhinomocks@googlegroups.com.
To unsubscribe from this group, send email to 
rhinomocks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.

Reply via email to