Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 8 Β· Quiz
Unit Testing with Mocks
1. What does the Arrange-Act-Assert pattern in unit testing emphasize?
Setting up the test environment
Asserting outcomes exclusively
Executing multiple tests simultaneously
Defining interaction verifications
2. Which mocking framework is mentioned as a way to create fake implementations for testing?
NUnit
xUnit
Moq
FluentAssertions
3. What should be avoided when testing async methods according to the lesson?
Using async Task as the return type
Using async void
Using the ReturnsAsync method
Using Assert.ThrowsAsync
4. What should you do if a test requires many mocks?
Add more tests for clarity
Add more verifications in each test
Refactor the class under test
Ignore mocking the excess dependencies
Submit answers
Continue: Testing Data Access and Controllers β
Review this lesson
Retake quiz