All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.crosstreelabs.junited.dbunit.annotation.DatabaseSetup Maven / Gradle / Ivy

The newest version!
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.crosstreelabs.junited.dbunit.annotation;

import com.crosstreelabs.junited.dbunit.Operation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface DatabaseSetup {
    /**
     * A list of dataset locations that will be used to seed the database. All
     * paths are considered relative to the class under test unless configured
     * otherwise.
     */
    String[] value();
    /**
     * When true, causes the class-level setup datasets to be prepended to any
     * additional method-level setup datasets. This option only takes effect
     * when specified at the method-level.
     */
    boolean additive() default true;
    /**
     * The type of operation used to reset the database prior to test execution.
     */
    Operation operation() default Operation.CLEAN_INSERT;
    /**
     * The name of the connection that should be used. Leave empty to use the
     * default connection.
     */
    String connection() default "";
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy