I'm putting together a unit testing training class for C# developers. I can debug through the code and see what's happening in some simple dependency injection examples. But I can't find the words / phrases to accurately describe what is happening when we create a class object and pass it a new Service.
Two questions.
How is this
var test = new Service();
Client client = new Client(test);
different that this?
Client client = new Client(new Service());
And what is the term used for the Service in this example?
new Client(new Service());