|
@ -1,12 +1,20 @@ |
|
|
|
|
|
import org.junit.jupiter.api.BeforeAll; |
|
|
import org.junit.jupiter.api.Test; |
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
|
class StorageTest { |
|
|
class StorageTest { |
|
|
|
|
|
|
|
|
|
|
|
static Storage storage; |
|
|
|
|
|
|
|
|
|
|
|
@BeforeAll |
|
|
|
|
|
static void init() { |
|
|
|
|
|
storage = new Storage(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
void constructor() { |
|
|
void constructor() { |
|
|
assertInstanceOf(Storage.class, new Storage()); |
|
|
|
|
|
|
|
|
assertInstanceOf(Storage.class, storage); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
@ -16,4 +24,9 @@ class StorageTest { |
|
|
@Test |
|
|
@Test |
|
|
void load() { |
|
|
void load() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void writeFile() { |
|
|
|
|
|
assertTrue(storage.writeFile("/tmp/test.txt", "test")); |
|
|
|
|
|
} |
|
|
} |
|
|
} |