2
Vote

Can't unit test code that generates OData links

description

There's no unit that encapsulates the logic around generating a full OData link, so tests end up integration style. Having an odata link factory abstraction allows unit testing such code.

We are putting two related properties together on the request: path handler and route name. These are a pair, which is a code smell that there's one abstraction here that should be used instead. Having an odata link factor also solves this problem.

comments

HongmeiG wrote Mar 12, 2013 at 10:15 PM

Can you improve this as part of your unit testability work?