W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
7 questions for “Testing in .NET (xUnit”
Found in 1 field. Select a question to see its full answer.
Matching topics
.NET
Dependency
In
jection
3
.NET
CI/CD, Publish
in
g & Deployment
1
.NET
Global Exception Handl
in
g & Middleware
1
Information Technology
7 questions in 2 technologies
#
Question
Technology
Topic
Level
1
What is dependency
in
jection, and how does ASP
.NET
Core's built-
in
DI conta
in
er support it?
.NET › Dependency Injection
.NET
Dependency
In
jection
Beginner
2
How do you configure a GitHub Actions workflow to build, test, and publish a
.NET
application?
.NET › CI/CD, Publishing & Deployment
.NET
CI/CD, Publish
in
g & Deployment
Intermediate
3
What is the difference between constructor
in
jection and service location (us
in
g IServiceProvider directly to resolve dependencies)?
.NET › Dependency Injection
.NET
Dependency
In
jection
Intermediate
4
How do you write an
in
tegration test verify
in
g that your global exception handler produces the correct error response shape?
.NET › Global Exception Handling & Middleware
.NET
Global Exception Handl
in
g & Middleware
Intermediate
5
How would you unit test a service that depends on multiple
in
jected
in
terfaces without sp
in
n
in
g up the full DI conta
in
er?
.NET › Dependency Injection
.NET
Dependency
In
jection
Advanced
6
How do you validate that an API's actual behavior matches its published OpenAPI specification, prevent
in
g documentation drift?
ASP.NET Core › API Documentation with Swagger/OpenAPI
ASP
.NET
Core
API Documentation with Swagger/OpenAPI
Intermediate
7
What is IHostEnvironment, and how do you use it to conditionally configure services based on the current environment?
.NET › Generic Host
.NET
Generic Host
Intermediate