Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kurz <m.kurz@irregular.at>
  • Loading branch information
mkurz authored and ceki committed Aug 12, 2023
1 parent d8a4bda commit 6952032
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,28 +155,28 @@ public void autoOnConsoleStatusListener() throws JoranException {
assertTrue(sll.size() == 1, sll.size() + " should be 1");
}

@Test
public void shouldConfigureFromXmlFile() throws MalformedURLException, JoranException {
assertNull(loggerContext.getObject(CoreConstants.SAFE_JORAN_CONFIGURATION));
@Test
public void shouldConfigureFromXmlFile() throws MalformedURLException, JoranException {
assertNull(loggerContext.getObject(CoreConstants.SAFE_JORAN_CONFIGURATION));

URL configurationFileUrl = Loader.getResource("BOO_logback-test.xml",
Thread.currentThread().getContextClassLoader());
configureByResource(configurationFileUrl);
URL configurationFileUrl = Loader.getResource("BOO_logback-test.xml",
Thread.currentThread().getContextClassLoader());
configureByResource(configurationFileUrl);

assertNotNull(loggerContext.getObject(CoreConstants.SAFE_JORAN_CONFIGURATION));
}
assertNotNull(loggerContext.getObject(CoreConstants.SAFE_JORAN_CONFIGURATION));
}

// @Test
// public void shouldConfigureFromGroovyScript() throws MalformedURLException, JoranException {
// LoggerContext loggerContext = new LoggerContext();
// ContextInitializer initializer = new ContextInitializer(loggerContext);
// assertNull(loggerContext.getObject(CoreConstants.CONFIGURATION_WATCH_LIST));
//
// URL configurationFileUrl = Loader.getResource("test.groovy", Thread.currentThread().getContextClassLoader());
// initializer.configureByResource(configurationFileUrl);
//
// assertNotNull(loggerContext.getObject(CoreConstants.CONFIGURATION_WATCH_LIST));
// }
// @Test
// public void shouldConfigureFromGroovyScript() throws MalformedURLException, JoranException {
// LoggerContext loggerContext = new LoggerContext();
// ContextInitializer initializer = new ContextInitializer(loggerContext);
// assertNull(loggerContext.getObject(CoreConstants.CONFIGURATION_WATCH_LIST));
//
// URL configurationFileUrl = Loader.getResource("test.groovy", Thread.currentThread().getContextClassLoader());
// initializer.configureByResource(configurationFileUrl);
//
// assertNotNull(loggerContext.getObject(CoreConstants.CONFIGURATION_WATCH_LIST));
// }

private void configureByResource(URL url) throws JoranException {
if (url == null) {
Expand Down

0 comments on commit 6952032

Please sign in to comment.