Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Unit Testing with JUnit

Front

Why is automated testing crucial for large projects?

It ensures consistent and scalable testing. Automated testing is essential in large projects as it consistently checks that…

View Card →
Flashcard Study

Java: Unit Testing with JUnit

Front

How does Mockito verify method calls?

By checking if a mock method was called with specific arguments. Mockito provides verification methods to ensure that…

View Card →
Flashcard Study

Java: Unit Testing with JUnit

Front

How do build tools like Gradle handle integration tests?

By configuring tasks to run post-build. Frame the concept in practical terms so you can explain it during…

View Card →
Flashcard Study

Java: Unit Testing with JUnit

Front

What's the purpose of assertions in JUnit tests?

To check that the code behaves as expected. Assertions in JUnit are used to verify that a method…

View Card →
Flashcard Study

Java: Unit Testing with JUnit

Front

How do you choose the right test seam?

Pick the smallest seam that actually exposes the risk you want to verify. Pure domain logic usually belongs…

View Card →
Flashcard Study

Java: Mocking with Mockito

Front

Gradle vs Maven in build configuration?

Gradle uses a scripting approach, while Maven uses a declarative XML configuration. Gradle's scripting capability allows more flexibility…

View Card →
Flashcard Study

Java: Mocking with Mockito

Front

Benefits of controlling returned states in tests?

Control over returned states allows testing various scenarios reliably. By controlling the states returned by mocked methods, you…

View Card →
Flashcard Study

Java: Mocking with Mockito

Front

Mocking dependencies in Maven?

Dependencies are managed in the 'pom.xml' file, specifying libraries needed. In Maven, dependencies are specified in the 'pom.xml'…

View Card →
Flashcard Study

Java: Mocking with Mockito

Front

Using Mockito's 'verify' method?

The 'verify' method checks if a method was called as expected. Mockito's 'verify' method ensures that certain methods…

View Card →
Flashcard Study

Java: Mocking with Mockito

Front

Trade-offs of extensive integration tests?

Integration tests offer broader coverage but can be slower and harder to debug. Integration tests evaluate how components…

View Card →