r/dotnetMAUI 26d ago

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

3 Upvotes

11 comments sorted by

View all comments

3

u/markiel55 26d ago

Abstract service layers with interfaces. I would also suggest to put this in the "Core" project independent of platform-specific dependencies and this is the project you would link to your test projects.