Testing Exceptions Practice
I hope you remember how you wrote exception handling in this chapter. It's time to practice writing tests for these assertions.
Task
Your task is to cover two methods from the ExceptionHandlingExercise class with tests using assertThrows() and assertDoesNotThrow() assertions in the unit test class that I have created for you.
¡Gracias por tus comentarios!
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Can you explain what the checkAge and printLength methods do?
What are assertThrows() and assertDoesNotThrow() used for in unit testing?
Can you give an example of how to write a test using assertThrows()?
Genial!
Completion tasa mejorada a 4.55
Testing Exceptions Practice
Desliza para mostrar el menú
I hope you remember how you wrote exception handling in this chapter. It's time to practice writing tests for these assertions.
Task
Your task is to cover two methods from the ExceptionHandlingExercise class with tests using assertThrows() and assertDoesNotThrow() assertions in the unit test class that I have created for you.
¡Gracias por tus comentarios!