bitblack / moq

Automatically exported from code.google.com/p/moq
Other
0 stars 0 forks source link

Creating Unit Test for Firebird DB #383

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi All

I am attempting to write Unit Test for my Database Repository. The backend Db I 
use is Firebird. I am wondering how do I mock my FbDataReader Class. I tried 
following but it doesn't seem to work

var mockIDbCommand = new Moq.Mock<Medgen.Domain.Abstract.IDBCommand>();
var mockIDataReader = new Moq.Mock<IDataReader>();
mockIDbCommand.SetupGet(i => i.ExecuteReader).Returns(mockIDataReader.Object);

Can anyone please guide me ?

Thanks

Anu

Original issue reported on code.google.com by a...@aimagroup.co.uk on 30 Apr 2015 at 11:14