Skip to content

Commit 978bb68

Browse files
committed
Added test for null data type but not option
1 parent 80dade8 commit 978bb68

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

wrappers/bukkit/src/test/java/it/angrybear/yagl/WrappersAdapterTest.java

+9
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,15 @@ void testInvalidParticleGeneralDataType() {
393393
assertNull(conversion.getValue());
394394
}
395395

396+
@Test
397+
void testInvalidDataTypeButNotOption() {
398+
Tuple<?, ?> conversion = new Refl<>(WrappersAdapter.class).invokeMethod("wParticleToGeneral",
399+
ParticleType.REDSTONE.create(Color.RED, 3f), org.bukkit.Particle.class, (Function<?, Class<?>>) s -> null);
400+
assertNotNull(conversion);
401+
assertNotNull(conversion.getKey());
402+
assertNull(conversion.getValue());
403+
}
404+
396405
@Test
397406
void testInvalidDataType() {
398407
assertThrowsExactly(IllegalArgumentException.class, () -> WrappersAdapter.convertOption(MockDataType.class, "String"));

0 commit comments

Comments
 (0)