diff --git a/src/test/kotlin/guru/state/StateStorageTest.kt b/src/test/kotlin/guru/state/StateStorageTest.kt index 127ecbf..18a11ec 100644 --- a/src/test/kotlin/guru/state/StateStorageTest.kt +++ b/src/test/kotlin/guru/state/StateStorageTest.kt @@ -2,6 +2,7 @@ package guru.state import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test +import java.io.File class StateStorageTest { @@ -15,4 +16,16 @@ class StateStorageTest { .isNotNull() .isEmpty() } + + @Test + fun `save empty state`() { + val storageName = "test" + val storage = StateStorage(storageName) + + storage.save(emptyMap()) + + val state = File(storageName) + assertThat(state).exists() + state.delete() + } } \ No newline at end of file