-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasicTestMapData.java
More file actions
32 lines (25 loc) · 1.02 KB
/
BasicTestMapData.java
File metadata and controls
32 lines (25 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package net.onelitefeather.guira;
import net.theevilreaper.aves.map.MapEntry;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import java.net.URISyntaxException;
import java.nio.file.Path;
import java.nio.file.Paths;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public abstract class BasicTestMapData {
protected static Path tempDir;
protected static MapEntry emptyMapEntry;
@BeforeAll
static void beforeAll() throws URISyntaxException {
tempDir = Paths.get(BasicTestMapData.class.getResource("/emptyFolder").toURI());
assertNotNull(tempDir, "The test class for the SetupData requires a folder with the name 'emptyFolder'");
emptyMapEntry = MapEntry.of(tempDir);
assertFalse(emptyMapEntry.hasMapFile(), "The emptyFolder for the test should not contain any files!");
}
@AfterAll
static void afterAll() {
tempDir = null;
emptyMapEntry = null;
}
}