mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +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;
|
||||
|
||||
import com.djrapitops.plugin.config.Config;
|
||||
import com.djrapitops.plugin.config.ConfigNode;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
@ -55,6 +56,23 @@ class ConfigChangeTest {
|
||||
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
|
||||
void moveChangeRecognizesItHasBeenApplied() {
|
||||
config = prepareConfig("Test: 'value'");
|
||||
|
Loading…
Reference in New Issue
Block a user