Testing Relationships Between Entities

As was described previously, there is no enforcement of relationships in the typed DataSet. We made this decision to facilitate the separation of testing of individual entities from testing the relationships between entities. Without such separation, we would have to create an entire tree of related objects just to test one individual object in that tree. For example, if the relationship between the Review and Reviewer were enforced, we would have to create a Reviewer entity before we could test a Review entity, which would significantly complicate our test code. However, because the relationships are not enforced by the typed DataSet, we need to write tests to ensure that the relationships work as expected. ...

Get Test-Driven Development in Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.