|
@@ -1,5 +1,6 @@
|
|
|
package me.lortseam.completeconfig.data;
|
|
|
|
|
|
+import me.lortseam.completeconfig.api.ConfigContainer;
|
|
|
import nl.altindag.log.LogCaptor;
|
|
|
import org.junit.jupiter.api.AfterEach;
|
|
|
import org.junit.jupiter.api.Test;
|
|
@@ -27,4 +28,10 @@ public class ConfigTest {
|
|
|
assertThrows(NullPointerException.class, () -> new Config(MOD_ID, new String[]{null}));
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ public void _throwExceptionIfContainersEmpty() {
|
|
|
+ IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> new Config(MOD_ID, new ConfigContainer[] {new ConfigContainer() {}}));
|
|
|
+ assertEquals("Config of ConfigSource(modId=" + MOD_ID + ", branch=[]) is empty", exception.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
}
|