Source:
public void testGetProjectInjectableBeans() throws Exception { Assert.assertEquals(0, cdiOperations.getProjectInjectableBeans(project).size()); try (CommandController controller = uiTestHarness.createCommandController(CDINewQualifierCommand.class, project.getRoot())) { controller.initialize(); controller.setValueFor("named", "MyQualifier"); controller.setValueFor("targetPackage", "org.jboss.forge.test"); Assert.assertTrue(controller.isValid()); Assert.assertTrue(controller.canExecute()); Result result = controller.execute(); Assert.assertThat(result, is(not(instanceOf(Failed.class)))); } Assert.assertEquals(0, cdiOperations.getProjectInjectableBeans(project).size()); try (CommandController controller = uiTestHarness.createCommandController(CDINewBeanCommand.class, project.getRoot())) { controller.initialize(); controller.setValueFor("named", "MyBean"); controller.setValueFor("targetPackage", "org.jboss.forge.test"); Assert.assertTrue(controller.isValid()); Assert.assertTrue(controller.canExecute()); Result result = controller.execute(); Assert.assertThat(result, is(not(instanceOf(Failed.class)))); } Assert.assertEquals(1, cdiOperations.getProjectInjectableBeans(project).size()); try (CommandController controller = uiTestHarness.createCommandController(JPANewEntityCommandImpl.class, project.getRoot())) { controller.initialize(); controller.setValueFor("named", "MyEntity"); controller.setValueFor("targetPackage", "org.jboss.forge.test"); Assert.assertTrue(controller.isValid()); Assert.assertTrue(controller.canExecute()); Result result = controller.execute(); Assert.assertThat(result, is(not(instanceOf(Failed.class)))); } Assert.assertEquals(1, cdiOperations.getProjectInjectableBeans(project).size()); }

Target:
public void testGetProjectInjectableBeans() throws Exception { Assert.assertEquals(0, cdiOperations.getProjectInjectableBeans(project).size()); try (CommandController controller = uiTestHarness.createCommandController(CDINewQualifierCommand.class, project.getRoot())) { controller.initialize(); controller.setValueFor("named", "MyQualifier"); controller.setValueFor("targetPackage", "org.jboss.forge.test"); Assert.assertTrue(controller.isValid()); Assert.assertTrue(controller.canExecute()); Result result = controller.execute(); Assert.assertThat(result, is(not(instanceOf(Failed.class)))); } Assert.assertEquals(0, cdiOperations.getProjectInjectableBeans(project).size()); try (CommandController controller = uiTestHarness.createCommandController(CDINewBeanCommand.class, project.getRoot())) { controller.initialize(); controller.setValueFor("named", "MyBean"); controller.setValueFor("targetPackage", "org.jboss.forge.test"); Assert.assertTrue(controller.isValid()); Assert.assertTrue(controller.canExecute()); Result result = controller.execute(); Assert.assertThat(result, is(not(instanceOf(Failed.class)))); } Assert.assertEquals(1, cdiOperations.getProjectInjectableBeans(project).size()); try (CommandController controller = uiTestHarness.createCommandController(JPANewEntityCommand.class, project.getRoot())) { controller.initialize(); controller.setValueFor("named", "MyEntity"); controller.setValueFor("targetPackage", "org.jboss.forge.test"); Assert.assertTrue(controller.isValid()); Assert.assertTrue(controller.canExecute()); Result result = controller.execute(); Assert.assertThat(result, is(not(instanceOf(Failed.class)))); } Assert.assertEquals(1, cdiOperations.getProjectInjectableBeans(project).size()); }