From 1c6984ba49e3e40c9a5bac826849f7a6c42fef1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 11 Jul 2019 14:43:52 +0200 Subject: [PATCH] =?utf8?q?=E2=9C=A8=20Add=20container=20for=20debug=20info?= =?utf8?q?rmation=20flags?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../pterodactylus/sone/core/DebugInformation.kt | 25 ++++++++++++++++ .../sone/core/DebugInformationTest.kt | 33 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 src/main/kotlin/net/pterodactylus/sone/core/DebugInformation.kt create mode 100644 src/test/kotlin/net/pterodactylus/sone/core/DebugInformationTest.kt diff --git a/src/main/kotlin/net/pterodactylus/sone/core/DebugInformation.kt b/src/main/kotlin/net/pterodactylus/sone/core/DebugInformation.kt new file mode 100644 index 0000000..acb0155 --- /dev/null +++ b/src/main/kotlin/net/pterodactylus/sone/core/DebugInformation.kt @@ -0,0 +1,25 @@ +/** + * Sone - DebugInformation.kt - Copyright © 2019 David ‘Bombe’ Roden + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.pterodactylus.sone.core + +class DebugInformation { + + @Volatile + var showVersionInformation = false + +} diff --git a/src/test/kotlin/net/pterodactylus/sone/core/DebugInformationTest.kt b/src/test/kotlin/net/pterodactylus/sone/core/DebugInformationTest.kt new file mode 100644 index 0000000..5ec1ea9 --- /dev/null +++ b/src/test/kotlin/net/pterodactylus/sone/core/DebugInformationTest.kt @@ -0,0 +1,33 @@ +/** + * Sone - DebugInformationTest.kt - Copyright © 2019 David ‘Bombe’ Roden + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.pterodactylus.sone.core + +import org.hamcrest.MatcherAssert.* +import org.hamcrest.Matchers.* +import kotlin.test.* + +class DebugInformationTest { + + private val debugInformation = DebugInformation() + + @Test + fun `new debug information has show version information set to off`() { + assertThat(debugInformation.showVersionInformation, equalTo(false)) + } + +} -- 2.7.4