I have a very simple and common scenario: WCF Service "MyService : IMyService" calling methods on objects from a different class library "MyLibrary.MyWorkerClass.DoWork()"
I'd like to use Unity in the service method to create the concrete instance of the MyWorkerClass.
To help with unit testing I'd like to do this through interfaces, so "MyService.PerformWork()" creates an instance of "IMyWorkerClass", and uses Unity to determine what the concrete implementation is.
My question is: Where do I declare the interface "IMyWorkerClass"?
If I delcare it in the Library, then I need the service to have a reference to the library. If I declare it in the Service project, then vice versa. If I want to be able to replace the library with a different one, then in the interface needs
to be declared in the Service project?
Which is the sensible/correct one?