From the course: Complete Guide To Java Testing with JUnit 5 & Mockito

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Challenge: Write a JUnit 5 test for a temperature converter

Challenge: Write a JUnit 5 test for a temperature converter

From the course: Complete Guide To Java Testing with JUnit 5 & Mockito

Challenge: Write a JUnit 5 test for a temperature converter

(bright music) - [Kathryn] In this challenge, you'll practice writing JUnit 5 tests by writing tests for a temperature converter class. The temperature converter is a utility class that has methods to convert temperatures between Celsius and Fahrenheit. It's a fundamental class that could be used in many applications from weather forecasting to cooking recipes. The converter should accurately convert temperatures in both directions, maintaining precision and correctness at all times. Your job is to write unit tests that effectively verify the functionality of this class using the tools you've learned in this chapter. Good luck and happy coding.

Contents