@Test public void testProjectTypeWithNoBuildSystemRequirements() throws Exception { File tempDir = OperatingSystemUtils.createTempDir(); try { WizardCommandController wizard = testHarness.createWizardController(NewProjectWizard.class); wizard.initialize(); Assert.assertFalse(wizard.canMoveToNextStep()); wizard.setValueFor("named", "test"); wizard.setValueFor("targetLocation", tempDir); wizard.setValueFor("topLevelPackage", "org.example"); wizard.setValueFor("type", "norequirements"); Assert.assertEquals( "norequirements", InputComponents.getValueFor(wizard.getInputs().get("type")).toString()); } finally { tempDir.delete(); } }
protected String getInputValue() { Object value = InputComponents.getValueFor(input); return (value == null) ? null : converter.convert(value); }