Hi
I see some good design benefits in DI and not just good testability design. So even though I have Typemock and could unit test without IOC, I still prefer constructor DI. I think it's a great way to quickly discover the dependencies of a class.
Now I'm wondering should I keep using interfaces as the type parameter in the constructor. They are very easy to create using Resharper, but it's still a type that I don't really need.
A quick example of what I mean
public interface IService
{
void Method();
}
public class Service : IService
{
public void Method()
{
}
}
public class ClassThatUsesDI
{
public ClassThatUsesDI(IService service) **or** (Service service)
{
}
}
What are your thoughts?