Package org.jboss.forge.addon.ui.controller

Examples of org.jboss.forge.addon.ui.controller.CommandController.initialize()


   @Test
   public void testCreateConnectionProfileCommand() throws Exception
   {
      CommandController command = testHarness.createCommandController(CreateConnectionProfileCommand.class);
      command.initialize();
      command.setValueFor("name", "test");
      command.setValueFor("jdbcUrl", "jdbc:h2:~/app-root/data/sakila");
      command.setValueFor("userName", "sa");
      command.setValueFor("userPassword", "");
      command.setValueFor("hibernateDialect", HibernateDialect.fromClassName("org.hibernate.dialect.H2Dialect"));
View Full Code Here


   @Ignore
   @Test
   public void testRemoveConnectionProfileCommand() throws Exception
   {
      CommandController command = testHarness.createCommandController(RemoveConnectionProfileCommand.class);
      command.initialize();
      command.setValueFor("names", "dummy");
      command.execute();
      Map<String, ConnectionProfile> profiles = manager.loadConnectionProfiles();
      Assert.assertEquals(0, profiles.size());
   }
View Full Code Here

   public void setup() throws Exception
   {
      project = projectFactory.createTempProject();
      CommandController gitSetupCommandTester = testHarness.createCommandController(GitSetupCommand.class,
               project.getRootDirectory());
      gitSetupCommandTester.initialize();
      gitSetupCommandTester.execute();

      CommandController gitIgnoreSetupTester = testHarness.createCommandController(GitIgnoreSetupCommand.class,
               project.getRootDirectory());
      gitIgnoreSetupTester.initialize();
View Full Code Here

      gitSetupCommandTester.initialize();
      gitSetupCommandTester.execute();

      CommandController gitIgnoreSetupTester = testHarness.createCommandController(GitIgnoreSetupCommand.class,
               project.getRootDirectory());
      gitIgnoreSetupTester.initialize();
      gitIgnoreSetupTester.setValueFor("templateRepoDir", getCloneDir());
      gitIgnoreSetupTester.execute();

      Resource<?> cloneDir = getCloneDir();
      boolean templateFound = false;
View Full Code Here

   @Test
   public void testGitIgnoreUpdateRepo() throws Exception
   {
      CommandController gitIgnoreUpdateRepoTester = testHarness.createCommandController(
               GitIgnoreUpdateRepoCommand.class, project.getRootDirectory());
      gitIgnoreUpdateRepoTester.initialize();
      Result result = gitIgnoreUpdateRepoTester.execute();
      assertTrue(result.getMessage().contains("Local gitignore repository updated"));
   }

   @Test
View Full Code Here

   @Test
   public void testGitIgnoreListTemplates() throws Exception
   {
      CommandController gitIgnoreListTemplatesTester = testHarness.createCommandController(
               GitIgnoreListTemplatesCommand.class, project.getRootDirectory());
      gitIgnoreListTemplatesTester.initialize();
      Result result = gitIgnoreListTemplatesTester.execute();
      String listOutput = result.getMessage().substring(result.getMessage().indexOf("==="));
      assertFalse(listOutput.contains(".gitignore"));
      assertTrue(listOutput.contains("= Languages ="));
      assertTrue(listOutput.contains("= Globals ="));
View Full Code Here

   {
      executeGitIgnoreCreate();

      CommandController gitIgnoreAddPatternTester = testHarness.createCommandController(
               GitIgnoreAddPatternCommand.class, project.getRootDirectory());
      gitIgnoreAddPatternTester.initialize();
      gitIgnoreAddPatternTester.setValueFor("pattern", "*.forge");
      gitIgnoreAddPatternTester.execute();

      GitIgnoreResource gitignore = gitIgnoreResource();
      String content = Streams.toString(gitignore.getResourceInputStream());
View Full Code Here

   {
      executeGitIgnoreCreate();

      CommandController gitIgnoreRemovePatternTester = testHarness.createCommandController(
               GitIgnoreRemovePatternCommand.class, project.getRootDirectory());
      gitIgnoreRemovePatternTester.initialize();
      gitIgnoreRemovePatternTester.setValueFor("pattern", "target/");
      gitIgnoreRemovePatternTester.execute();

      GitIgnoreResource gitignore = gitIgnoreResource();
      String content = Streams.toString(gitignore.getResourceInputStream());
View Full Code Here

      project.getFacet(FurnaceVersionFacet.class).setVersion(furnace.getVersion().toString());
      facetFactory.install(project, AddonTestFacet.class);

      CommandController controller = testHarness.createCommandController(NewFurnaceTestCommand.class,
               project.getRoot());
      controller.initialize();
      controller.setValueFor("named", "MyTestCase");
      controller.setValueFor("packageName", "org.jboss.forge.test");
      UISelectMany<AddonId> component = (UISelectMany<AddonId>) controller.getInputs().get("addonDependencies");
      UISelectOne<AddonId> furnaceContainer = (UISelectOne<AddonId>) controller.getInputs().get("furnaceContainer");
      AddonId funaceContainerAddonId = furnaceContainer.getValueChoices().iterator().next();
View Full Code Here

   {
      executeGitIgnoreCreate();

      CommandController gitIgnoreListPatternsTester = testHarness.createCommandController(
               GitIgnoreListPatternsCommand.class, project.getRootDirectory());
      gitIgnoreListPatternsTester.initialize();
      Result result = gitIgnoreListPatternsTester.execute();

      assertTrue(result.getMessage().contains("target/"));
      assertTrue(result.getMessage().contains(".settings/"));
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.