}
@Test
- fun `core starts without debug flags`() {
+ fun `core starts with debug set to false`() {
+ val core = createCore()
+ assertThat(core.debug, equalTo(false))
+ }
+
+ @Test
+ fun `debug flag can be set`() {
+ val core = createCore()
+ core.setDebug()
+ assertThat(core.debug, equalTo(true))
+ }
+
+ private fun createCore(): Core {
val configuration = mock<Configuration>()
val freenetInterface = mock<FreenetInterface>()
val identityManager = mock<IdentityManager>()
val webOfTrustUpdater = mock<WebOfTrustUpdater>()
val eventBus = mock<EventBus>()
val database = mock<Database>()
- val core = Core(configuration, freenetInterface, identityManager, soneDownloader, imageInserter, updateChecker, webOfTrustUpdater, eventBus, database)
- assertThat(core.debugInformation.showVersionInformation, equalTo(false))
+ return Core(configuration, freenetInterface, identityManager, soneDownloader, imageInserter, updateChecker, webOfTrustUpdater, eventBus, database)
}
}