-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test invalid deserializer in node helper
- Loading branch information
1 parent
d18f9ba
commit 81548db
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/test/java/com/clubobsidian/wrappy/test/helper/NodeHelperTest.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,22 @@ | ||
package com.clubobsidian.wrappy.test.helper; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
import java.io.File; | ||
|
||
import org.junit.Test; | ||
import org.spongepowered.configurate.ConfigurationNode; | ||
|
||
import com.clubobsidian.wrappy.Configuration; | ||
import com.clubobsidian.wrappy.helper.NodeHelper; | ||
|
||
public class NodeHelperTest { | ||
|
||
@Test | ||
public void testInvalid() { | ||
Configuration config = Configuration.load(new File("test.yml")); | ||
ConfigurationNode node = config.getNode(); | ||
NodeHelper<Double> helper = new NodeHelper<>(node); | ||
assertTrue(helper.get("key", Double.class) == null); | ||
} | ||
} |