I am TDD newb, and I would like to figure out how to test the following code.
At first I try to write my tests, but I had problems creating a test that concerns my DataAccessor. I canβt figure out how to do this. I increased the dispatch class and overriding the Load () method; continue testing the facility. I feel as if in the end I am testing my Mock objects / stubs, not my real objects. I thought that in TDD, unit tests should have hit ALL of the methods on the object; however, I can never verify that the Load () code only overrides the Mock Load
My tests were written by an object that contains a list of orders based on shipping.
I have an object that is loading from a database.
public class Shipment {
I create my fake dispatch class to test the rest of the class methods. I can never test the Real load method without actually connecting to the DB
public class FakeShipment : Shipment { protected new void Load() { _listOfOrders = new List<string>(); } }
Any thoughts? Please inform.
Dave
source share