I am new to using Unit Test. I saw a YouTube video for Coding Rooms that allows the teacher to test if the student code contains a specifc String. I tried it in a repl but could not get it to work.
Hopefully you are able to see my Dog.java code as well as the unit test that I need help with.
I ran the unit test and got the following error message:
Installing imported packages
Failed to compile test runner file
./_test_runnerTestSuite.java:13: error: unreported exception IOException; must be caught or declared to be thrown
String student_code = new String(Files.readAllBytes(Paths.get("Dog.java")));
^
Note: ./_test_runnerTestRunner.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
exit status 1