org.ops4j.pax.exam.junit

Class PaxExamServer

  • java.lang.Object
    • org.junit.rules.ExternalResource
      • org.ops4j.pax.exam.junit.PaxExamServer
  • All Implemented Interfaces:
    org.junit.rules.TestRule


    public class PaxExamServerextends org.junit.rules.ExternalResource
    JUnit rule for launching a Pax Exam container in server mode for a JUnit test.

    Example

       public class MyTest {      @Rule     public PaxExamServer exam = new PaxExamServer(); } 
    This rule starts a Pax Exam container before each test and stops it after the test. The configuration options for the exam container are taken from a method in the test class annotated with Configuration. The test class must contain a unique no-args method with this annotation and with return type Option[].

    Alternatively, you can pass a class literal to the PaxExamServer constructor. In this case, the @Configuration method will be taken from the class argument.

    This test rule can be used with any plain old unit test or in combination with other JUnit runners. Do not use this rule in combination with the PaxExam runner.

    PaxExamServer can also be used as a class rule. In this case, test container is started once before running all tests of the class and is stopped when all tests have run.

    Author:
    Harald Wellmann
    • Constructor Detail

      • PaxExamServer

        public PaxExamServer()
      • PaxExamServer

        public PaxExamServer(Class<?> configClass)
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,                                      org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule
        Overrides:
        apply in class org.junit.rules.ExternalResource
      • before

        protected void before()               throws Exception
        Overrides:
        before in class org.junit.rules.ExternalResource
        Throws:
        Exception
      • after

        protected void after()
        Overrides:
        after in class org.junit.rules.ExternalResource

Copyright © 2006–2016 OPS4J - Open Participation Software for Java. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14