|
|
@ -100,17 +100,6 @@ class ListHabitsBehaviorTest : BaseUnitTest() {
|
|
|
|
FileUtils.deleteDirectory(outputDir)
|
|
|
|
FileUtils.deleteDirectory(outputDir)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
@Throws(Exception::class)
|
|
|
|
|
|
|
|
fun testOnExportCSV_fail() {
|
|
|
|
|
|
|
|
val outputDir = Files.createTempDirectory("CSV").toFile()
|
|
|
|
|
|
|
|
outputDir.setWritable(false)
|
|
|
|
|
|
|
|
whenever(dirFinder.getCSVOutputDir()).thenReturn(outputDir)
|
|
|
|
|
|
|
|
behavior.onExportCSV()
|
|
|
|
|
|
|
|
verify(screen).showMessage(ListHabitsBehavior.Message.COULD_NOT_EXPORT)
|
|
|
|
|
|
|
|
assertTrue(outputDir.delete())
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
fun testOnHabitClick() {
|
|
|
|
fun testOnHabitClick() {
|
|
|
|
behavior.onClickHabit(habit1)
|
|
|
|
behavior.onClickHabit(habit1)
|
|
|
|