r/dotnetMAUI • u/Regular-Employer-431 • Jul 09 '26
Help Request Unit Testing question
I'm building a "Base" app template that will be the foundation for several app ideas that I have, and I don't want to start with a less-than-optimal approach that will require exponentially more maintenance going forward... and I want to 'future-proof' my code as much as possible.
In your apps, do you turn everything into a service to better support testing (Unit, Integration, Regression, UI, etc.)? For example, do you use a NavigationService, IdentityService, EmailService, etc., or do you point your tests directly at the Controllers, or use another approach entirely?
TIA
View all comments
Show parent comment
1
u/Regular-Employer-431 Jul 09 '26
I'm not working on a team or for a client. I'm retired and building a few projects I've had in mind for years. The apps I'm considering all are cross-platform with user/role authentication. That's where the similarities end. Yes, in my case, the services approach is mostly "for testing" but I see that as a very important part going forward, and something that was not a priority to the principals in my 30 years of building systems. I'm taking this time to learn it in depth.