当前位置: 首页>>代码示例>>Java>>正文


Java OverProtocol类代码示例

本文整理汇总了Java中org.jboss.arquillian.container.test.api.OverProtocol的典型用法代码示例。如果您正苦于以下问题:Java OverProtocol类的具体用法?Java OverProtocol怎么用?Java OverProtocol使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OverProtocol类属于org.jboss.arquillian.container.test.api包,在下文中一共展示了OverProtocol类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment
@OverProtocol("Servlet 3.0")
public static WebArchive create() {

    File[] dependencies = Maven.resolver()
            .loadPomFromClassLoaderResource("pom.xml")
            .importRuntimeAndTestDependencies()
            .resolve()
            .withTransitivity()
            .asFile();

    WebArchive war = ShrinkWrap.create(WebArchive.class)
            .addPackages(true, "edu.ksu.canvas.attendance")
            .addAsLibraries(dependencies);

    addStaticResourcesTo(war);
    addJspsToWar(war);

    //System.err.println("The war file contains the following files...\n"+war.toString(true));
    return war;
}
 
开发者ID:kstateome,项目名称:lti-attendance,代码行数:22,代码来源:BaseArquillianTest.java

示例2: create

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment(name = "as-maven-importer", order = 1)
@TargetsContainer("arquillian-wildfly-managed-1")
@OverProtocol("Servlet 3.0")
public static Archive<?> createTestArchive1() {
    /* unfortunately your test dependencies must be listed here */
    File[] assertJ = Maven.resolver()
            .loadPomFromFile("pom.xml")
            .resolve("org.assertj:assertj-core")
            .withTransitivity()
            .asFile();

    // important:: the deployment name is taken as artifact file name
    // because we have two deployments we should rename one deployment to "customized-webcontent.war"
    return create(MavenImporter.class, "customized-webcontent.war")
            .loadPomFromFile("pom.xml")
            .importBuildOutput(/*Do NOT use due to creates very big WAR new AcceptScopesStrategy(COMPILE, IMPORT, RUNTIME, TEST)*/)
            .as(WebArchive.class)
            .addAsLibraries(assertJ)
            .addClass(TestDataCreator.class)
            .addAsWebInfResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml")
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsWebInfResource(new File(getProperty("web.xml")), "web.xml");
}
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:24,代码来源:DummyIT.java

示例3: createFromZipFile

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment(name = "as-maven-artifact-file", order = 2)
@TargetsContainer("arquillian-wildfly-managed-2")
@OverProtocol("Servlet 3.0")
public static Archive<?> createTestArchive2() {
    /* unfortunately your test dependencies must be listed here */
    File[] assertJ = Maven.resolver()
            .loadPomFromFile("pom.xml")
            .resolve("org.assertj:assertj-core")
            .withTransitivity()
            .asFile();

    // important:: the deployment name is taken as artifact file name
    return createFromZipFile(WebArchive.class, new File(getProperty("artifact.file")))
            .addAsLibraries(assertJ)
            .addClass(TestDataCreator.class);
}
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:17,代码来源:DummyIT.java

示例4: createTestArchive

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment
@OverProtocol("Servlet 3.0")
public static Archive<?> createTestArchive() {
    return create(MavenImporter.class)
            .loadPomFromFile("pom.xml")
            .importBuildOutput()
            .as(WebArchive.class)
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsWebInfResource(new File(getProperty("web.xml")), "web.xml");
}
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:11,代码来源:DummyIT.java

示例5: createTestArchive

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment
@OverProtocol("Servlet 3.0")
public static Archive<?> createTestArchive() {
    return create(MavenImporter.class)
            .loadPomFromFile("pom.xml")
            .importBuildOutput()
            .as(WebArchive.class)
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsWebInfResource(new File(getProperty("web.xml")), "web.xml")
            .addAsWebInfResource(new File(getProperty("jboss-web.xml")), "jboss-web.xml");
}
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:12,代码来源:JmsIT.java

示例6: createTestArchive

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment(name = "FunctionalIT-shouldFindTimerTicks")
@OverProtocol("Servlet 3.0")
public static Archive<?> createTestArchive() {
    //ShrinkWrap.create(MavenImporter.class).configureFromFile("/path/to/settings.xml").loadPomFromFile("/path/to/pom.xml").importBuildOutput().as(JavaArchive.class)
    /*File[] libs = *///ShrinkWrap.create(MavenImporter.class).loadPomFromFile("pom.xml").importBuildOutput().as(WebArchiveImpl.class);resolve().withTransitivity().asFile();

    return create(MavenImporter.class)
            //.configureFromFile("/path/to/settings.xml")
            .loadPomFromFile("pom.xml")
            .importBuildOutput()
            .as(WebArchive.class)
            .addAsWebInfResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml")
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsWebInfResource(new File(getProperty("web.xml")), "web.xml")
            .addAsResource(new StringAsset("Manifest-Version: 1.0\r\n" +
                            "Dependencies: org.apache.commons.collections export, org.apache.commons.lang export"),
                    "META-INF/MANIFEST.MF");

    /*File[] libs = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeAndTestDependencies().resolve().withTransitivity().asFile();
    WebArchive res = ShrinkWrap.create(WebArchive.class, "test.war");
    res.addClass(A.class);
    return res.addAsLibraries(libs);*/

    /*return ShrinkWrap
            .create(WebArchive.class, *//*HikeRepositoryIT.class.getSimpleName() + *//*"test.war")
            *//*.addPackage( Hike.class.getPackage() )
            .addPackage( HikeRepository.class.getPackage() )
            .addAsResource( "META-INF/persistence.xml" )
            .addAsWebInfResource( new File( WEBAPP_SRC + "WEB-INF/beans.xml" ) )
            .addAsResource( new StringAsset(
                            "Dependencies: org.hibernate:ogm services, org.hibernate.ogm.mongodb services" ),
                    "META-INF/MANIFEST.MF"
            )*//*;*/
}
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:35,代码来源:FunctionalIT.java

示例7: createTestArchive

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment(name = "FunctionalIT-shouldFindTimerTicks")
@OverProtocol("Servlet 3.0")
public static Archive<?> createTestArchive() {
    return create(MavenImporter.class)
            .loadPomFromFile("pom.xml")
            .importBuildOutput()
            .as(WebArchive.class)
            .addAsWebInfResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml")
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsWebInfResource(new File(getProperty("web.xml")), "web.xml")
            .addAsResource(new StringAsset("Manifest-Version: 1.0\r\n" +
                            "Dependencies: org.apache.commons.collections export, org.apache.commons.lang export"),
                    "META-INF/MANIFEST.MF");
}
 
开发者ID:Tibor17,项目名称:javaee-samples,代码行数:15,代码来源:FunctionalIT.java

示例8: createDeployment

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment
@OverProtocol("Servlet 3.0")
public static WebArchive createDeployment()
{ 
	/*Logger jl = Logger.getLogger("");
	jl.setLevel(Level.FINEST);
	
	for (Handler h : jl.getHandlers())
		h.setLevel(Level.ALL);
	*/
	System.err.println("Creating class...");
	
	WebArchive archive = ShrinkWrap.create(WebArchive.class);
	//archive.addClass(AsynchronousTransportTest.class);
	//archive.addClass(HTTPServlet30.class);
	archive.addAsResource("log4j.properties", ArchivePaths.create("log4j.properties"));
	
	System.err.println("About to resolve...");
	
	File[] files = Maven.resolver().offline().loadPomFromFile("pom.xml").resolve("com.ericsson.research.trap.transports:http-server-servlet-3.0", "com.ericsson.research.trap.transports:http-client-sun").withTransitivity().asFile();
	archive.addAsLibraries(files);
	//archive.addAsWebInfResource(new File("src/test/resources", "web-3.0-test.xml"), "web.xml");
	//archive.setWebXML(new File("src/test/resources", "web-3.0-test.xml"));
	
	System.out.println(archive.toString(true));
	
	return archive;
}
 
开发者ID:EricssonResearch,项目名称:trap,代码行数:29,代码来源:Servlet30Test.java

示例9: createDeployment

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment
@OverProtocol("Servlet 2.5")
public static WebArchive createDeployment()
{
	/*Logger jl = Logger.getLogger("");
	jl.setLevel(Level.FINEST);
	
	for (Handler h : jl.getHandlers())
		h.setLevel(Level.ALL);
	*/
	System.err.println("Creating class...");
	
	WebArchive archive = ShrinkWrap.create(WebArchive.class);
	archive.setWebXML("web-2.5.xml");
	//archive.addClass(AsynchronousTransportTest.class);
	//archive.addClass(HTTPServlet30.class);
	
	System.err.println("About to resolve...");
	
	File[] files = Maven.resolver().offline().loadPomFromFile("pom.xml").resolve("com.ericsson.research.trap.transports:http-server-servlet-2.5", "com.ericsson.research.trap.transports:http-client-sun").withTransitivity().asFile();
	archive.addAsLibraries(files);
	//archive.addAsWebInfResource(new File("src/test/resources", "web-3.0-test.xml"), "web.xml");
	
	System.out.println(archive.toString(true));
	
	return archive;
}
 
开发者ID:EricssonResearch,项目名称:trap,代码行数:28,代码来源:Servlet25Test.java

示例10: generateProtocol

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
private ProtocolDescription generateProtocol(Method deploymentMethod)
{
   if (deploymentMethod.isAnnotationPresent(OverProtocol.class))
   {
      return new ProtocolDescription(deploymentMethod.getAnnotation(OverProtocol.class).value());
   }
   return new FurnaceProtocolDescription();
}
 
开发者ID:forge,项目名称:furnace,代码行数:9,代码来源:FurnaceDeploymentScenarioGenerator.java

示例11: war

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment(testable = false)
@OverProtocol("Servlet 2.5") // to use a custom web.xml
public static Archive<?> war() {
    return ShrinkWrap.create(WebArchive.class, "batchee-gui.war")
        // GUI
        .addPackages(true, JBatchResourceImpl.class.getPackage())
        .addPackages(true, JBatchResource.class.getPackage())
        .addAsWebInfResource(new StringAsset(
            Descriptors.create(WebAppDescriptor.class)
                .metadataComplete(false)
                .createServlet()
                .servletName("CXF")
                .servletClass("org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet")
                .createInitParam()
                .paramName("jaxrs.serviceClasses")
                .paramValue(JBatchResourceImpl.class.getName())
                .up()
                .createInitParam()
                .paramName("jaxrs.providers")
                .paramValue(JohnzonBatcheeProvider.class.getName() + "," + JBatchExceptionMapper.class.getName())
                .up()
                .createInitParam()
                .paramName("jaxrs.outInterceptors")
                .paramValue(LoggingOutInterceptor.class.getName())
                .up()
                .up()
                .createServletMapping()
                .servletName("CXF")
                .urlPattern("/api/*")
                .up()
                .exportAsString()
        ), "web.xml")
        // test data to create some job things to do this test
        .addPackage(CreateSomeJobs.class.getPackage())
        .addAsWebInfResource("META-INF/batch-jobs/init.xml", "classes/META-INF/batch-jobs/init.xml");
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:37,代码来源:RestTest.java

示例12: generateProtocol

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
/**
 * @param deploymentMethod
 * @return
 */
private ProtocolDescription generateProtocol(Method deploymentMethod)
{
   if (deploymentMethod.isAnnotationPresent(OverProtocol.class))
   {
      return new ProtocolDescription(deploymentMethod.getAnnotation(OverProtocol.class).value());
   }
   return ProtocolDescription.DEFAULT;
}
 
开发者ID:koentsje,项目名称:forge-furnace,代码行数:13,代码来源:ForgeDeploymentScenarioGenerator.java

示例13: processArchive

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment
@OverProtocol("jmx-as7")
public static JavaArchive processArchive() {
  return ShrinkWrap.create(JavaArchive.class)
    .addClass(AbstractFoxPlatformIntegrationTest.class)
    .addClass(DefaultEjbProcessApplication.class)
    .addAsResource("META-INF/processes.xml", "META-INF/processes.xml")
    .addAsResource("org/camunda/bpm/integrationtest/testDeployProcessArchive.bpmn20.xml");
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:10,代码来源:TestJarDeployment.java

示例14: createFilterArchive

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment(testable = false, name = "server-filter-1")
@TargetsContainer("container1")
@OverProtocol("jmx-as7")
public static Archive<?> deploy1() throws IOException {
   return createFilterArchive();
}
 
开发者ID:infinispan,项目名称:infinispan-hadoop,代码行数:7,代码来源:InputOutputFormatTest.java

示例15: createFilterArchive

import org.jboss.arquillian.container.test.api.OverProtocol; //导入依赖的package包/类
@Deployment(testable = false, name = "server-filter-1")
@TargetsContainer("container1")
@OverProtocol("jmx-as7")
public static Archive<?> deploy1() throws IOException {
    return createFilterArchive();
}
 
开发者ID:infinispan,项目名称:infinispan-hadoop,代码行数:7,代码来源:FailoverHandlingTest.java


注:本文中的org.jboss.arquillian.container.test.api.OverProtocol类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。