001package org.atteo.moonshine.tests;
002
003import java.lang.annotation.ElementType;
004import java.lang.annotation.Retention;
005import java.lang.annotation.RetentionPolicy;
006import java.lang.annotation.Target;
007
008import org.atteo.moonshine.Moonshine;
009
010/**
011 * Can be specified on a test class extending {@link MoonshineTest}.
012 * Allows to specify configuration resources to use when starting {@link Moonshine} framework.
013 */
014@Retention(RetentionPolicy.RUNTIME)
015@Target(ElementType.TYPE)
016public @interface MoonshineConfiguration {
017    /**
018     * List of resources to use as configuration for {@link Moonshine}.
019     */
020    String[] value() default {};
021
022    /**
023     * In-place configuration.
024     */
025    String fromString() default "";
026
027    /**
028     * Skip reading default configuration from '/default-config.xml' classpath resource.
029     */
030    boolean skipDefault() default false;
031
032    /**
033     * Command line arguments.
034     */
035    String[] arguments() default {};
036
037    /**
038     * Specifies external configurator for Moonshine.
039     */
040    Class<? extends MoonshineConfigurator> configurator() default MoonshineConfigurator.class;
041}