Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to test the domain services in Domain driven design?

I am developing a console application using domain driven design, i tried to keep the domain logic as much as possible into domain entities, but some how, some logic leaked into domain services, so now, do i need to test the domain services, if yes how to do it?

like image 774
Mahesh kumar Chiliveri Avatar asked Dec 15 '22 14:12

Mahesh kumar Chiliveri


1 Answers

Yes, if they contain logic, they have to be tested.

If the service was properly decoupled, it should be possible to test it with unit tests and dependency injection.

like image 80
Pharao2k Avatar answered May 17 '23 23:05

Pharao2k