Package org.jboss.forge.addon.parser.java.facets

Examples of org.jboss.forge.addon.parser.java.facets.JavaSourceFacet.saveTestJavaSource()


      {
         getDeployment.addAnnotation("Dependencies").setLiteralValue("{" + annotationBody + "}");
      }

      JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
      JavaResource javaResource = facet.saveTestJavaSource(javaClass);
      uiContext.setSelection(javaResource);
      return Results.success("Test class " + javaClass.getQualifiedName() + " created");
   }

   @Override
View Full Code Here


         Project project = getFaceted();
         JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
         String topLevelPackage = facet.getBasePackage();
         JavaClassSource testClass = Roaster.create(JavaClassSource.class).setPackage(topLevelPackage);
         testClass.setName("AbstractTestCase").setAbstract(true);
         facet.saveTestJavaSource(testClass.getEnclosingType());
         return true;
      }
      return false;
   }
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.