Expand|Select|Wrap|Line Numbers
- public void read(String dirname,String regex) throws IOException{
On my JUnit testing I have the following test:
The test tests whether the path or directory is valid or not
Expand|Select|Wrap|Line Numbers
- @Test //2
- public void testPathInvalid() throws IOException {
- TableCollection all = new TableCollection();
- try {
- all.read("junk/file","");
- }
- catch
- (FileNotFoundException e) {
- return;
- }
- fail("FileNotFoundException expected");
- }
- //This returns the following error
- java.lang.NullPointerException from line:61 i.e all.read("junk/file","");