Package org.jboss.forge.addon.javaee.cdi

Examples of org.jboss.forge.addon.javaee.cdi.CDIFacet_1_0.saveConfig()


   {
      Project project = projectHelper.createJavaLibraryProject();
      CDIFacet_1_0 cdiFacet = projectHelper.installCDI_1_0(project);
      org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor config = cdiFacet.getConfig();
      config.getOrCreateAlternatives().clazz("org.myclazz.MyAlternative");
      cdiFacet.saveConfig(config);

      shellTest.execute("cd " + project.getRoot().getFullyQualifiedName(), 10, TimeUnit.SECONDS);
      shellTest.execute("cdi-list-alternatives", 10, TimeUnit.SECONDS);
      Assert.assertThat(shellTest.getStdOut(), CoreMatchers.containsString("org.myclazz.MyAlternative"));
   }
View Full Code Here


   {
      Project project = projectHelper.createJavaLibraryProject();
      CDIFacet_1_0 cdiFacet = projectHelper.installCDI_1_0(project);
      org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor config = cdiFacet.getConfig();
      config.getOrCreateDecorators().clazz("org.myclazz.MyDecorator");
      cdiFacet.saveConfig(config);

      shellTest.execute("cd " + project.getRoot().getFullyQualifiedName(), 10, TimeUnit.SECONDS);
      shellTest.execute("cdi-list-decorators", 10, TimeUnit.SECONDS);
      Assert.assertThat(shellTest.getStdOut(), CoreMatchers.containsString("org.myclazz.MyDecorator"));
   }
View Full Code Here

   {
      Project project = projectHelper.createJavaLibraryProject();
      CDIFacet_1_0 cdiFacet = projectHelper.installCDI_1_0(project);
      org.jboss.shrinkwrap.descriptor.api.beans10.BeansDescriptor config = cdiFacet.getConfig();
      config.getOrCreateInterceptors().clazz("org.myclazz.MyInterceptor");
      cdiFacet.saveConfig(config);

      shellTest.execute("cd " + project.getRoot().getFullyQualifiedName(), 10, TimeUnit.SECONDS);
      shellTest.execute("cdi-list-interceptors", 10, TimeUnit.SECONDS);
      Assert.assertThat(shellTest.getStdOut(), CoreMatchers.containsString("org.myclazz.MyInterceptor"));
   }
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.