in reply to Re: Re: OT: Data Structure First or Code First?
in thread OT: Data Structure First or Code First?
A simple unit test might feed that API several dates, comparing the resulting HTML to known-good reference copies.
To make this work will probably require that you get your data access abstraction right, so that you can pass a stubbed database in for testing purposes. Or, you can structure the calendar object such that it's populated by a separate agent. Use a dummy agent for populating with test data, and a real agent (which you write separate unit tests for) for accessing the database.
|
---|