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

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


      controller2.setValueFor("targetEjb", "org.jboss.forge.test.TestEJB");
      controller2.setValueFor("type", TransactionAttributeType.NOT_SUPPORTED);
      Assert.assertTrue(controller2.canExecute());

      Assert.assertFalse(((JavaClass<?>) javaResource.getJavaType()).hasAnnotation(TransactionAttribute.class));
      controller2.execute();
      Assert.assertTrue(((JavaClass<?>) javaResource.getJavaType()).hasAnnotation(TransactionAttribute.class));
      Assert.assertEquals(TransactionAttributeType.NOT_SUPPORTED,
               ((JavaClass<?>) javaResource.getJavaType()).getAnnotation(TransactionAttribute.class).getEnumValue(
                        TransactionAttributeType.class));
View Full Code Here


                  project.getRoot());
         command.initialize();
         command.setValueFor("arguments", COORDINATES);
         Assert.assertTrue(command.isValid());
         Assert.assertTrue(command.canExecute());
         Result result = command.execute();
         Assert.assertTrue(result instanceof Failed);
      }
      finally
      {
         project.getRoot().delete(true);
View Full Code Here

      controller3.setValueFor("type", TransactionAttributeType.NEVER);
      Assert.assertTrue(controller3.canExecute());

      Assert.assertFalse(((JavaClass<?>) javaResource.getJavaType()).getMethod("onMessage", Message.class)
               .hasAnnotation(TransactionAttribute.class));
      controller3.execute();
      project = projectHelper.refreshProject(project);
      Assert.assertTrue(project.hasFacet(EJBFacet.class));
      Assert.assertTrue(project.hasFacet(JMSFacet.class));
      Assert.assertTrue(((JavaClass<?>) javaResource.getJavaType()).getMethod("onMessage", Message.class)
               .hasAnnotation(
View Full Code Here

                  project.getRoot());
         command.initialize();
         command.setValueFor("arguments", Arrays.asList(COORDINATES, COORDINATES2));
         Assert.assertTrue(command.isValid());
         Assert.assertTrue(command.canExecute());
         Result result = command.execute();
         Assert.assertTrue(result instanceof Failed);
      }
      finally
      {
         project.getRoot().delete(true);
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.