// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/dataset/DataSetLoader.java
// public interface DataSetLoader {
// 
// 	/**
// 	 * Loads and returns {@link IDataSet dataset} for the specified class and location.
//      * If the dataset cannot be found <tt>null</tt> may be returned.
// 	 *
// 	 * @param testClass The class under test
// 	 * @param location The location to load
// 	 * @return a {@link IDataSet dataset} or <tt>null</tt>
// 	 * @throws Exception If the {@link IDataSet dataset} cannot be loaded
// 	 */
// 	IDataSet loadDataSet(Class<?> testClass, String location) throws Exception;
// 
// }
// 
// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/dataset/ContentGuessingDatasetLoader.java
// public class ContentGuessingDatasetLoader extends AbstractDataSetLoader {
// 
//     @Override
//     protected IDataSet createDataSet(URL resourceUrl) throws Exception {
//         String uri = resourceUrl.toString();
//         String extension = uri.substring(uri.lastIndexOf(".")+1).toLowerCase();
//         IDataSet iDataSet = null;
//         switch (extension) {
//             case "xml": {
//                 iDataSet = new FlatXmlDataSetLoader().createDataSet(resourceUrl);
//                 break;
//             }
//             case "yml": {
//                 iDataSet = new YamlDataSetLoader().createDataSet(resourceUrl);
//                 break;
//             }
//             case "json": {
//                 iDataSet = new JsonDataSetLoader().createDataSet(resourceUrl);
//                 break;
//             }
//             default: {
//                 throw new RuntimeException(String.format("Dataset format %s not supported",extension));
//             }
//         }
//         return iDataSet;
// 
//     }
// }
// 
// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/operation/DatabaseOperationLookup.java
// public interface DatabaseOperationLookup {
// 
// 	/**
// 	 * Returns the DBUnit {@link org.dbunit.operation.DatabaseOperation Database Operation} that should
//      * be used for the specified internal operation or {@code null} if the operation is not supported.
//      *
// 	 * @param operation the enum value
// 	 * @return the DBUnit databsae operation or {@code null}.
// 	 */
// 	org.dbunit.operation.DatabaseOperation get(DatabaseOperation operation);
// 
// }
// 
// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/operation/DefaultDatabaseOperationLookup.java
// public class DefaultDatabaseOperationLookup implements DatabaseOperationLookup {
// 
// 	private static Map<DatabaseOperation, org.dbunit.operation.DatabaseOperation> OPERATION_LOOKUP;
// 	static {
// 		OPERATION_LOOKUP = new HashMap<>();
// 		OPERATION_LOOKUP.put(DatabaseOperation.UPDATE, org.dbunit.operation.DatabaseOperation.UPDATE);
// 		OPERATION_LOOKUP.put(DatabaseOperation.INSERT, org.dbunit.operation.DatabaseOperation.INSERT);
// 		OPERATION_LOOKUP.put(DatabaseOperation.REFRESH, org.dbunit.operation.DatabaseOperation.REFRESH);
// 		OPERATION_LOOKUP.put(DatabaseOperation.DELETE, org.dbunit.operation.DatabaseOperation.DELETE);
// 		OPERATION_LOOKUP.put(DatabaseOperation.DELETE_ALL, org.dbunit.operation.DatabaseOperation.DELETE_ALL);
// 		OPERATION_LOOKUP.put(DatabaseOperation.TRUNCATE_TABLE, org.dbunit.operation.DatabaseOperation.TRUNCATE_TABLE);
// 		OPERATION_LOOKUP.put(DatabaseOperation.CLEAN_INSERT, org.dbunit.operation.DatabaseOperation.CLEAN_INSERT);
// 	}
// 
// 	public org.dbunit.operation.DatabaseOperation get(DatabaseOperation operation) {
// 		return OPERATION_LOOKUP.get(operation);
// 	}
// 
// }


import com.github.deltaspikedbunit.dataset.DataSetLoader;
import com.github.deltaspikedbunit.dataset.ContentGuessingDatasetLoader;
import com.github.deltaspikedbunit.operation.DatabaseOperationLookup;
import com.github.deltaspikedbunit.operation.DefaultDatabaseOperationLookup;
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;
import org.dbunit.dataset.IDataSet;
/*
 * Copyright 2002-2015 the original author or authors
 *
 * 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.github.deltaspikedbunit.annotation;





/**
 * Configures a test run.
 *
 * @author Luigi Bitonti
 * @author Phillip Webb
 */
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface DbUnitConfiguration {

	/**
	 * Returns the class that will be used to load {@link IDataSet} resources. The specified class must implement
	 * {@link DataSetLoader} and must have a default constructor.
	 * @return the data set loader class
	 */
	Class<? extends DataSetLoader> dataSetLoader() default ContentGuessingDatasetLoader.class;

	/**
	 * Returns the class that will be used to lookup DBUnit database operations. The specific class must implement
	 * {@link DatabaseOperationLookup} and must have a default constructor.
	 * @return the database operation lookup
	 */
// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/dataset/DataSetLoader.java
// public interface DataSetLoader {
// 
// 	/**
// 	 * Loads and returns {@link IDataSet dataset} for the specified class and location.
//      * If the dataset cannot be found <tt>null</tt> may be returned.
// 	 *
// 	 * @param testClass The class under test
// 	 * @param location The location to load
// 	 * @return a {@link IDataSet dataset} or <tt>null</tt>
// 	 * @throws Exception If the {@link IDataSet dataset} cannot be loaded
// 	 */
// 	IDataSet loadDataSet(Class<?> testClass, String location) throws Exception;
// 
// }
// 
// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/dataset/ContentGuessingDatasetLoader.java
// public class ContentGuessingDatasetLoader extends AbstractDataSetLoader {
// 
//     @Override
//     protected IDataSet createDataSet(URL resourceUrl) throws Exception {
//         String uri = resourceUrl.toString();
//         String extension = uri.substring(uri.lastIndexOf(".")+1).toLowerCase();
//         IDataSet iDataSet = null;
//         switch (extension) {
//             case "xml": {
//                 iDataSet = new FlatXmlDataSetLoader().createDataSet(resourceUrl);
//                 break;
//             }
//             case "yml": {
//                 iDataSet = new YamlDataSetLoader().createDataSet(resourceUrl);
//                 break;
//             }
//             case "json": {
//                 iDataSet = new JsonDataSetLoader().createDataSet(resourceUrl);
//                 break;
//             }
//             default: {
//                 throw new RuntimeException(String.format("Dataset format %s not supported",extension));
//             }
//         }
//         return iDataSet;
// 
//     }
// }
// 
// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/operation/DatabaseOperationLookup.java
// public interface DatabaseOperationLookup {
// 
// 	/**
// 	 * Returns the DBUnit {@link org.dbunit.operation.DatabaseOperation Database Operation} that should
//      * be used for the specified internal operation or {@code null} if the operation is not supported.
//      *
// 	 * @param operation the enum value
// 	 * @return the DBUnit databsae operation or {@code null}.
// 	 */
// 	org.dbunit.operation.DatabaseOperation get(DatabaseOperation operation);
// 
// }
// 
// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/operation/DefaultDatabaseOperationLookup.java
// public class DefaultDatabaseOperationLookup implements DatabaseOperationLookup {
// 
// 	private static Map<DatabaseOperation, org.dbunit.operation.DatabaseOperation> OPERATION_LOOKUP;
// 	static {
// 		OPERATION_LOOKUP = new HashMap<>();
// 		OPERATION_LOOKUP.put(DatabaseOperation.UPDATE, org.dbunit.operation.DatabaseOperation.UPDATE);
// 		OPERATION_LOOKUP.put(DatabaseOperation.INSERT, org.dbunit.operation.DatabaseOperation.INSERT);
// 		OPERATION_LOOKUP.put(DatabaseOperation.REFRESH, org.dbunit.operation.DatabaseOperation.REFRESH);
// 		OPERATION_LOOKUP.put(DatabaseOperation.DELETE, org.dbunit.operation.DatabaseOperation.DELETE);
// 		OPERATION_LOOKUP.put(DatabaseOperation.DELETE_ALL, org.dbunit.operation.DatabaseOperation.DELETE_ALL);
// 		OPERATION_LOOKUP.put(DatabaseOperation.TRUNCATE_TABLE, org.dbunit.operation.DatabaseOperation.TRUNCATE_TABLE);
// 		OPERATION_LOOKUP.put(DatabaseOperation.CLEAN_INSERT, org.dbunit.operation.DatabaseOperation.CLEAN_INSERT);
// 	}
// 
// 	public org.dbunit.operation.DatabaseOperation get(DatabaseOperation operation) {
// 		return OPERATION_LOOKUP.get(operation);
// 	}
// 
// }


// Path: deltaspike-dbunit/src/main/java/com/github/deltaspikedbunit/annotation/DbUnitConfiguration.java
import com.github.deltaspikedbunit.dataset.DataSetLoader;
import com.github.deltaspikedbunit.dataset.ContentGuessingDatasetLoader;
import com.github.deltaspikedbunit.operation.DatabaseOperationLookup;
import com.github.deltaspikedbunit.operation.DefaultDatabaseOperationLookup;
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;
import org.dbunit.dataset.IDataSet;

/*
 * Copyright 2002-2015 the original author or authors
 *
 * 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.github.deltaspikedbunit.annotation;





/**
 * Configures a test run.
 *
 * @author Luigi Bitonti
 * @author Phillip Webb
 */
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface DbUnitConfiguration {

	/**
	 * Returns the class that will be used to load {@link IDataSet} resources. The specified class must implement
	 * {@link DataSetLoader} and must have a default constructor.
	 * @return the data set loader class
	 */
	Class<? extends DataSetLoader> dataSetLoader() default ContentGuessingDatasetLoader.class;

	/**
	 * Returns the class that will be used to lookup DBUnit database operations. The specific class must implement
	 * {@link DatabaseOperationLookup} and must have a default constructor.
	 * @return the database operation lookup
	 */
	Class<? extends DatabaseOperationLookup> databaseOperationLookup() default DefaultDatabaseOperationLookup.class;