I have a method using which I can read a file and get required information.But this file is opened in another private method. If file doesn't exist it shows me FileNotFoundException.
Now I'd like to make a test to this method in JUnit to catch FileNotFoundException but I can't catch this FileNotFoundException because it's from previous private method.
Could someone please help me out here?
Aucun commentaire:
Enregistrer un commentaire