vendredi 19 mars 2021

JUnit testing throw NullPointerException

I need to test a function in JUnit5 (interface-based). I do not have the implementation. If one of the function's parameters is null, I need to throw NullPointerException. My question is, how can I test this function to throw a NullPointerException without using the function's output (only the parameters)? Thank you!

Aucun commentaire:

Enregistrer un commentaire