Unit Testing Flashcard

Unit Testing Flashcard

Assessment

Flashcard

Information Technology (IT)

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

19 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What does the "Arrange-Act-Assert" pattern refer to in unit testing?

Back

A structure for writing test methods that separates setup, execution, and verification.

2.

FLASHCARD QUESTION

Front

Which of these is a key characteristic of a good unit test? Options: Tests multiple components at once, Runs quickly, Requires a database connection, Changes behavior based on environment

Back

Runs quickly

3.

FLASHCARD QUESTION

Front

What is a "mock" in unit testing?

Back

A way to simulate the behavior of real objects.

4.

FLASHCARD QUESTION

Front

Which popular mocking framework is specifically designed for .NET? Options: JMock, MockJS, Moq, EasyMock

Back

Moq

5.

FLASHCARD QUESTION

Front

What does the term "Code Coverage" refer to?

Back

The proportion of your code that is executed during tests.

6.

FLASHCARD QUESTION

Front

Which pattern is commonly used to make code more testable by removing direct dependencies? Options: Singleton Pattern, Dependency Injection, Observer Pattern, Builder Pattern

Back

Dependency Injection

7.

FLASHCARD QUESTION

Front

Which of the following is NOT a benefit of unit testing? Options: Finds integration issues between systems, Provides documentation of code behavior, Facilitates good design, Helps with regression testing

Back

Finds integration issues between systems

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?