diff --git a/src/test/kotlin/de/gmuth/ipp/client/IppJobTests.kt b/src/test/kotlin/de/gmuth/ipp/client/IppJobTests.kt index 052b04cc..70ec2210 100644 --- a/src/test/kotlin/de/gmuth/ipp/client/IppJobTests.kt +++ b/src/test/kotlin/de/gmuth/ipp/client/IppJobTests.kt @@ -209,4 +209,10 @@ class IppJobTests { job.cupsGetDocuments(save = true, directory = createTempDirectory().toFile()) } + @Test + fun cupsGetDocumentsWithoutSaving() { + ippClientMock.mockResponse(cupsDocumentResponse("application/postscript")) + job.cupsGetDocuments() + } + } \ No newline at end of file diff --git a/src/test/kotlin/de/gmuth/ipp/core/IppAttributesGroupTests.kt b/src/test/kotlin/de/gmuth/ipp/core/IppAttributesGroupTests.kt index 81495288..0238f8e1 100644 --- a/src/test/kotlin/de/gmuth/ipp/core/IppAttributesGroupTests.kt +++ b/src/test/kotlin/de/gmuth/ipp/core/IppAttributesGroupTests.kt @@ -7,6 +7,7 @@ package de.gmuth.ipp.core import de.gmuth.ipp.core.IppAttributesGroup.Companion.replaceEnabled import de.gmuth.ipp.core.IppTag.* import java.io.File +import java.io.PrintWriter import java.time.ZoneId import java.util.logging.Logger.getLogger import kotlin.test.Test @@ -137,6 +138,11 @@ class IppAttributesGroupTests { group.saveText(File.createTempFile("tempfiles", ".tmp")) } + @Test + fun writeAttributesWithoutTitle() { + group.writeText(PrintWriter(java.lang.System.out), null) + } + // ------------- interface Map methods ------------ @Test diff --git a/src/test/kotlin/de/gmuth/ipp/core/IppMessageTests.kt b/src/test/kotlin/de/gmuth/ipp/core/IppMessageTests.kt index 02442c4f..00db2463 100644 --- a/src/test/kotlin/de/gmuth/ipp/core/IppMessageTests.kt +++ b/src/test/kotlin/de/gmuth/ipp/core/IppMessageTests.kt @@ -97,8 +97,13 @@ class IppMessageTests { assertEquals("codeDescription []", message.toString()) message.log(logger) assertFailsWith { // missing raw bytes - message.saveBytes(createTempFile("test", null)) + message.saveBytes(createTempFile("rawbytes", null)) } } + @Test + fun writeTest() { + message.saveText(createTempFile("text", null)) + } + } \ No newline at end of file