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
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
-
-
-
-
Set up JUnit 5 in your Java application2m 24s
-
(Locked)
Write and run your first JUnit 5 test4m 11s
-
(Locked)
Assertions in JUnit 57m 56s
-
(Locked)
JUnit 5 test lifecycle1m 51s
-
(Locked)
JUnit 5 lifecycle hooks2m 49s
-
(Locked)
Testing exceptions in JUnit 52m 54s
-
(Locked)
Debug tests in JUnit 54m 30s
-
(Locked)
Best practices for writing tests in JUnit 52m 17s
-
(Locked)
Challenge: Write a JUnit 5 test for a temperature converter47s
-
(Locked)
Solution: Write a JUnit 5 Test for a Temperature Converter6m 33s
-
-
-
-
-
-
-
-