Timeline for Should I mock a Domain Service?
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 26, 2018 at 8:19 | comment | added | guillaume31 | I would put everything under the same parent namespace, though this has little importance, really. | |
Jan 26, 2018 at 8:18 | history | edited | guillaume31 | CC BY-SA 3.0 |
added 5 characters in body
|
Jan 26, 2018 at 8:16 | comment | added | guillaume31 | Did you watch the talk that goes with the code? | |
Jan 25, 2018 at 23:39 | comment | added | w0051977 | Could you clarify what you mean by: "there may be traces of the old design in the after code"? | |
Jan 25, 2018 at 14:24 | comment | added | w0051977 | Thanks. I have a namespace called: Company.Technology.Feature.AggregateRoot. The Domain Service is used by this aggregate root only Would the Domain Service be: Company.Technology.Feature.AggregateRoot.DomainService or would you put it in a different namespace to the aggregate root? If they are all one unit then I believe they should be contained in the same namespace. | |
Jan 25, 2018 at 14:17 | comment | added | guillaume31 | Also note that domain services are not the only kind of Service in DDD - it is more legitimate to use mocks in tests for the other kinds. | |
Jan 25, 2018 at 14:16 | comment | added | guillaume31 | Yes. The logic behind it is that the domain is a central self-sufficient bubble and domain services are no exception. | |
Jan 25, 2018 at 9:09 | comment | added | w0051977 | Thanks. Can you confirm that when you talk about "isolated domain tests have no need for mocks" then this includes Domain Services as no-one specifically specifies this - they specify Entities; Values and Domain Events. | |
Jan 25, 2018 at 8:35 | history | edited | guillaume31 | CC BY-SA 3.0 |
added 9 characters in body
|
Jan 25, 2018 at 8:30 | history | answered | guillaume31 | CC BY-SA 3.0 |