commit 14cabeb098524400fa64d404384a589b95509c96 parent e6eb76e4ee8154aa26497d1112d640cb54dab07b Author: Marcello Stanisci <stanisci.m@gmail.com> Date: Tue, 22 Oct 2019 11:36:11 +0200 rename methods Diffstat:
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sandbox/src/main/kotlin/Main.kt b/sandbox/src/main/kotlin/Main.kt @@ -369,7 +369,7 @@ private suspend fun ApplicationCall.ebicsweb() { respondText( contentType = ContentType.Application.Xml, status = HttpStatusCode.OK) { - xmlProcess.getStringFromJaxb(response.get()).toString() + xmlProcess.convertJaxbToString(response.get()).toString() } return @@ -393,7 +393,7 @@ private suspend fun ApplicationCall.ebicsweb() { ) ) - val responseText: String? = xmlProcess.getStringFromJaxb(hevResponse.get()) + val responseText: String? = xmlProcess.convertJaxbToString(hevResponse.get()) respondText( contentType = ContentType.Application.Xml, diff --git a/sandbox/src/main/kotlin/XML.kt b/sandbox/src/main/kotlin/XML.kt @@ -242,7 +242,7 @@ class XML { * @param document the DOM to extract the string from. * @return the final String, or null if errors occur. */ - fun getStringFromDocument(document: Document): String? { + fun convertDocumentToString(document: Document): String? { try { /* Make Transformer. */ @@ -272,7 +272,7 @@ class XML { * @param obj the JAXB instance * @return String representation of @a object, or null if errors occur */ - fun <T> getStringFromJaxb(obj: JAXBElement<T>): String? { + fun <T> convertJaxbToString(obj: JAXBElement<T>): String? { val sw = StringWriter() try { diff --git a/sandbox/src/test/kotlin/JaxbTest.kt b/sandbox/src/test/kotlin/JaxbTest.kt @@ -63,7 +63,7 @@ class JaxbTest { */ @Test fun jaxbToString() { - processor.getStringFromJaxb(hevResponseJaxb.get()) + processor.convertJaxbToString(hevResponseJaxb.get()) } /** diff --git a/sandbox/src/test/kotlin/MarshalNonJaxbTest.kt b/sandbox/src/test/kotlin/MarshalNonJaxbTest.kt @@ -35,6 +35,6 @@ class MarshalNonJaxbTest { ) val proc = XML() - println(proc.getStringFromJaxb(obj.get())) + println(proc.convertJaxbToString(obj.get())) } } \ No newline at end of file diff --git a/sandbox/src/test/kotlin/ResponseTest.kt b/sandbox/src/test/kotlin/ResponseTest.kt @@ -17,7 +17,7 @@ class ResponseTest { "All is OK." ) - print(xmlprocess.getStringFromJaxb(response.get())) + print(xmlprocess.convertJaxbToString(response.get())) }