This repository has been archived by the owner on May 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e295262
commit 710f081
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/test/java/com/clubobsidian/dynamicgui/parser/test/slot/MoveableTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.clubobsidian.dynamicgui.parser.test.slot; | ||
|
||
import static org.junit.Assert.assertFalse; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
import java.io.File; | ||
|
||
import org.junit.Test; | ||
|
||
import com.clubobsidian.dynamicgui.parser.slot.SlotToken; | ||
import com.clubobsidian.wrappy.Configuration; | ||
import com.clubobsidian.wrappy.ConfigurationSection; | ||
|
||
public class MoveableTest { | ||
|
||
@Test | ||
public void testSlotMoveable() | ||
{ | ||
File slotFolder = new File("test", "slot"); | ||
File metadataFile = new File(slotFolder, "moveable.yml"); | ||
Configuration config = Configuration.load(metadataFile); | ||
ConfigurationSection slot = config.getConfigurationSection("0"); | ||
SlotToken token = new SlotToken(0, slot); | ||
assertTrue(token.isMoveable()); | ||
} | ||
|
||
@Test | ||
public void testSlotNotMoveable() | ||
{ | ||
File slotFolder = new File("test", "slot"); | ||
File metadataFile = new File(slotFolder, "moveable.yml"); | ||
Configuration config = Configuration.load(metadataFile); | ||
ConfigurationSection slot = config.getConfigurationSection("1"); | ||
SlotToken token = new SlotToken(1, slot); | ||
assertFalse(token.isMoveable()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'0': | ||
moveable: true | ||
'1': | ||
moveable: false |