Is it considered correct to create an interface
for my domain object
? If I want to write unit tests against services which return a domain object, or check the values of these objects (when they return a list of domain objects) I think it seems right, but this article this article seems to suggest I shouldn't.
Is it considered correct to create an interface
for my domain object
? If I want to write unit tests against services which return a domain object, or check the values of these objects (when they return a list of domain objects) I think it seems right, but this article seems to suggest I shouldn't.
Is it considered correct to create an interface
for my domain object
? If I want to write unit tests against services which return a domain object, or check the values of these objects (when they return a list of domain objects) I think it seems right, but this article seems to suggest I shouldn't.
Is it considered correct to create an interface
for my domain object
? If I want to write unit tests against services which return a domain object, or check the values of these objects (when they return a list of domain objects) I think it seems right, but this article seems to suggest I shouldn't.
Questions
Questions
Is it considered correct to create an interface
for my domain object
? If I want to write unit tests against services which return a domain object, or check the values of these objects (when they return a list of domain objects) I think it seems right, but this article seems to suggest I shouldn't.
Questions
Introduction
Recently I have moved from an environment where I am not unit testing, into one where I need to.
I have been a developer for many years and get core development concepts, as well as unit testing ones such as DI/Ioc, Mocking etc. I also understand the values, importance of unit testing and writing good tests, as well as asking myself often: "What Would Roy Do?".
There are other posts talking about mocking the entire framework, but this to me feels overkill?. Is there a better way than creating hand-written substitutions for every single table and value within there?
Footnote
I'm wanting to make the tests as lean and independent as I can, so when new developers join the team it is easy and straightforward for them to pick up. As a result of this I have created this post, after searching around for similar questions and articles. I hope the question does not appear too broad, or not a good fit. I hope it will prove useful for others having a problem with this topic.
Introduction
Recently I have moved from an environment where I am not unit testing, into one where I need to.
I have been a developer for many years and get core development concepts, as well as unit testing ones such as DI/Ioc, Mocking etc. I also understand the values, importance of unit testing and writing good tests, as well as asking myself often: "What Would Roy Do?".
There are other posts talking about mocking the entire framework, but this to me feels overkill? Is there a better way than creating hand-written substitutions for every single table and value within there?
Footnote
I'm wanting to make the tests lean and independent as I can, so when new developers join the team it is easy and straightforward for them to pick up. As a result of this I have created this post, after searching around for similar questions and articles. I hope the question does not appear too broad, or not a good fit. I hope it will prove useful for others having a problem with this topic.
I have been a developer for many years and get core development concepts, as well as unit testing ones such as DI/Ioc, Mocking etc. I also understand the values, importance of unit testing and writing good tests, as well as asking myself often: "What Would Roy Do?".
There are other posts talking about mocking the entire framework, but this to me feels overkill. Is there a better way than creating hand-written substitutions for every single table and value within there?
I'm wanting to make the tests as lean and independent as I can, so when new developers join the team it is easy and straightforward for them to pick up.