mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-12 15:56:00 +08:00
Added tests that reveal why some other tests are failing
This commit is contained in:
parent
4e83fb6f25
commit
f3d201a0b0
@ -17,6 +17,7 @@
|
|||||||
package com.djrapitops.plan.system.settings.changes;
|
package com.djrapitops.plan.system.settings.changes;
|
||||||
|
|
||||||
import com.djrapitops.plugin.config.Config;
|
import com.djrapitops.plugin.config.Config;
|
||||||
|
import com.djrapitops.plugin.config.ConfigNode;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
@ -55,6 +56,23 @@ class ConfigChangeTest {
|
|||||||
assertFalse(new ConfigChange.Moved("Test", "MovedTo").hasBeenApplied(config));
|
assertFalse(new ConfigChange.Moved("Test", "MovedTo").hasBeenApplied(config));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void configParentIsSameObject() {
|
||||||
|
config = prepareConfig("Test: 'value'");
|
||||||
|
ConfigNode node = config.getConfigNode("Test");
|
||||||
|
ConfigNode parent = node.getParent();
|
||||||
|
assertTrue(parent instanceof Config);
|
||||||
|
assertSame(config, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void configParentChildrenIsSameObject() {
|
||||||
|
config = prepareConfig("Test: 'value'");
|
||||||
|
ConfigNode node = config.getConfigNode("Test");
|
||||||
|
ConfigNode parent = node.getParent();
|
||||||
|
assertSame(config.getChildren(), parent.getChildren());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void moveChangeRecognizesItHasBeenApplied() {
|
void moveChangeRecognizesItHasBeenApplied() {
|
||||||
config = prepareConfig("Test: 'value'");
|
config = prepareConfig("Test: 'value'");
|
||||||
|
Loading…
Reference in New Issue
Block a user