diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-02-11 16:15:01 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-02-11 16:15:01 +0100 |
commit | 38599d632ec4e5b31af7ea98e0c8ac4423c470f9 (patch) | |
tree | 86d1b36c6f46feade9775f2866d4b7847f48c96e /util | |
parent | 81ecdd6bf707bc41f028ff7da71dc30f4f576a49 (diff) | |
download | libeufin-38599d632ec4e5b31af7ea98e0c8ac4423c470f9.tar.gz libeufin-38599d632ec4e5b31af7ea98e0c8ac4423c470f9.tar.bz2 libeufin-38599d632ec4e5b31af7ea98e0c8ac4423c470f9.zip |
API skeleton
Diffstat (limited to 'util')
-rw-r--r-- | util/src/test/kotlin/LogTest.kt | 12 | ||||
-rw-r--r-- | util/src/test/kotlin/XmlUtilTest.kt | 10 |
2 files changed, 7 insertions, 15 deletions
diff --git a/util/src/test/kotlin/LogTest.kt b/util/src/test/kotlin/LogTest.kt index fae69f83..c6eb2639 100644 --- a/util/src/test/kotlin/LogTest.kt +++ b/util/src/test/kotlin/LogTest.kt @@ -1,13 +1,8 @@ -import org.junit.Assert import org.junit.Test -import org.junit.Assert.* import org.slf4j.LoggerFactory -import java.net.URLClassLoader -import tech.libeufin.util.LOGGER as utilLogger class LogTest { - @Test fun logLine() { val loggerSandbox = LoggerFactory.getLogger("tech.libeufin.sandbox") @@ -15,11 +10,4 @@ class LogTest { loggerSandbox.info("line") loggerNexus.trace("other line") } - - @Test - fun logFromUtil() { - /* This log should show up with 'util' name but without this latter owning a logback.xml */ - utilLogger.trace("shown") - } } - diff --git a/util/src/test/kotlin/XmlUtilTest.kt b/util/src/test/kotlin/XmlUtilTest.kt index 67c35e1e..57394b8b 100644 --- a/util/src/test/kotlin/XmlUtilTest.kt +++ b/util/src/test/kotlin/XmlUtilTest.kt @@ -1,6 +1,8 @@ import org.apache.xml.security.binding.xmldsig.SignatureType import org.junit.Test import org.junit.Assert.* +import org.slf4j.Logger +import org.slf4j.LoggerFactory import tech.libeufin.util.ebics_h004.EbicsKeyManagementResponse import tech.libeufin.util.ebics_h004.EbicsResponse import tech.libeufin.util.ebics_h004.EbicsTypes @@ -10,9 +12,11 @@ import tech.libeufin.util.XMLUtil import java.security.KeyPairGenerator import java.util.* import javax.xml.transform.stream.StreamSource -import tech.libeufin.util.LOGGER import tech.libeufin.util.XMLUtil.Companion.signEbicsResponse +val logger: Logger = LoggerFactory.getLogger("tech.libeufin.util") + + class XmlUtilTest { @Test @@ -64,7 +68,7 @@ class XmlUtilTest { </HTDResponseOrderData>""".trimIndent() ) - LOGGER.debug(tmp.value.partnerInfo.orderInfoList[0].description) + logger.debug(tmp.value.partnerInfo.orderInfoList[0].description) } @Test @@ -73,7 +77,7 @@ class XmlUtilTest { XMLUtil.convertStringToJaxb<EbicsKeyManagementResponse>("<malformed xml>") } catch (e: javax.xml.bind.UnmarshalException) { // just ensuring this is the exception - LOGGER.info("caught") + logger.info("caught") return } assertTrue(false) |