© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
5 replies
Stilau

xUnit and Dependency Injection

Hello,
I have not ran too many unit testings up through my time, but recently getting into a bit more of a heavy program where unit testing will be crucial.


The project is dependent on Dependency Injection, and I was wondering if its possible to run unit tests on methods from DI services...?
I have currently a Core Project and a Test Project, and I want to be able to get a DI service from the Core Project and run a test with it inside the test project.


How would I be able to do this?
Any help is appreciated,
Thanks 😊
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ IEnumerable and dependency injection
C#CC# / help
4y ago
Dependency injection
C#CC# / help
6mo ago
✅ Dependency injection
C#CC# / help
2y ago
❔ Dependency Injection
C#CC# / help
3y ago