Coverage Report - org.jitr.annotation.JitrConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
JitrConfiguration
N/A
N/A
0
 
 1  
 /*
 2  
  * Copyright 2009, Josh Devins, Jitr.org.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *      http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 
 17  
 package org.jitr.annotation;
 18  
 
 19  
 import java.lang.annotation.Documented;
 20  
 import java.lang.annotation.ElementType;
 21  
 import java.lang.annotation.Inherited;
 22  
 import java.lang.annotation.Retention;
 23  
 import java.lang.annotation.RetentionPolicy;
 24  
 import java.lang.annotation.Target;
 25  
 
 26  
 import org.jitr.core.Defaults;
 27  
 import org.jitr.core.OperationalMode;
 28  
 
 29  
 /**
 30  
  * Test classes that want to customize how Jitr runs will need to be annotated with this annotation.
 31  
  * If your test class is not annotated with this, it will use the Jitr defaults as defined here.
 32  
  */
 33  
 @Documented
 34  
 @Inherited
 35  
 @Retention(RetentionPolicy.RUNTIME)
 36  
 @Target(value = { ElementType.TYPE })
 37  
 public @interface JitrConfiguration {
 38  
 
 39  
     /**
 40  
      * Sets the type of container you want Jitr to use.
 41  
      */
 42  
     Class<?> containerClass() default Object.class;
 43  
 
 44  
     /**
 45  
      * Sets the relative path of the working directory for the container. The default container work
 46  
      * path will be correct for Maven projects.
 47  
      * 
 48  
      * <p>
 49  
      * Default value: <code>target</code>
 50  
      * </p>
 51  
      */
 52  
     String containerWorkPath() default Defaults.DEFAULT_CONTAINER_WORK_PATH;
 53  
 
 54  
     /**
 55  
      * Context path for the war.
 56  
      * 
 57  
      * <p>
 58  
      * Default value: <code>/</code>
 59  
      * </p>
 60  
      */
 61  
     String contextPath() default Defaults.DEFAULT_CONTEXT_PATH;
 62  
 
 63  
     /**
 64  
      * Operational mode to run in.
 65  
      * 
 66  
      * <p>
 67  
      * Default value: {@link OperationalMode#INTERNAL}
 68  
      * </p>
 69  
      */
 70  
     OperationalMode mode() default OperationalMode.INTERNAL;
 71  
 
 72  
     /**
 73  
      * Set the port number for the container to use. To let Jitr choose a random, unused port, do
 74  
      * not set this value.
 75  
      * 
 76  
      * <p>
 77  
      * Default value: <code>-1</code>
 78  
      * </p>
 79  
      */
 80  
     int port() default Defaults.DEFAULT_PORT;
 81  
 
 82  
     /**
 83  
      * The path to the unpacked war. This is relative to the running location. The default war path
 84  
      * will be correct for Maven projects.
 85  
      * 
 86  
      * <p>
 87  
      * Default value: <code>src/main/webapp</code>
 88  
      * </p>
 89  
      */
 90  
     String warPath() default Defaults.DEFAULT_WAR_PATH;
 91  
 }