mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-22 16:17:44 +00:00
f
This commit is contained in:
1 parent
07cc76614f
commit
bdaa84975a
14 files changed
+200
-29
No files matched your search
+16
@@ -8,9 +8,11 @@ import org.junit.Test;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class CommandStudioCreationContractTest {
|
||||
@Test
|
||||
@@ -24,4 +26,18 @@ public class CommandStudioCreationContractTest {
|
||||
assertEquals("null", template.defaultValue());
|
||||
assertEquals(NullableDimensionHandler.class, template.customHandler());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void openExposesAnOptInForceFlag() throws NoSuchMethodException {
|
||||
Method command = CommandStudio.class.getDeclaredMethod(
|
||||
"open",
|
||||
IrisDimension.class,
|
||||
long.class,
|
||||
boolean.class
|
||||
);
|
||||
Param force = command.getParameters()[2].getAnnotation(Param.class);
|
||||
|
||||
assertEquals("false", force.defaultValue());
|
||||
assertTrue(List.of(force.aliases()).contains("f"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user