Very simply what I'm trying to find out is, is there any way of cleanly unit testing this body of code? I can instantiate it and run some assertions but I mean actual unit testing where i would mock the service object to remove any dependancies of the class under test and actually have it test only this class and not its dependent services (in this case ConcreteService).
public class Foo{
public SomeResult DoSomething(){
var service = new ConcreteService();
var foo = service.Execute();
return foo;
}
}
My normal approach is to not have this type of object creation in my body of code, but given a scenraio where this cant be changed, what are my options for unit testing it?