From: David ‘Bombe’ Roden Date: Thu, 11 Jul 2019 12:43:52 +0000 (+0200) Subject: ✨ Add container for debug information flags X-Git-Tag: v81^2~193 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=1c6984ba49e3e40c9a5bac826849f7a6c42fef1d ✨ Add container for debug information flags --- 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)) + } + +}