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

org.etlunit.feature.mysql_database.MySQLDatabaseFeatureModule Maven / Gradle / Ivy

package org.etlunit.feature.mysql_database;

import com.google.inject.Injector;
import org.etlunit.feature.FeatureModule;
import org.etlunit.feature.AbstractFeature;
import org.etlunit.NullClassListener;
import org.etlunit.TestAssertionFailure;
import org.etlunit.TestExecutionError;
import org.etlunit.TestWarning;
import org.etlunit.feature.database.DatabaseFeatureModule;
import org.etlunit.parser.ETLTestOperation;
import org.etlunit.parser.ETLTestValueObject;
import org.etlunit.context.VariableContext;
import org.etlunit.ExecutionContext;
import org.etlunit.ClassListener;

import javax.inject.Inject;
import java.util.Arrays;
import java.util.List;

@FeatureModule
public class MySQLDatabaseFeatureModule extends AbstractFeature {
	private DatabaseFeatureModule databaseFeatureModule;
	private MySQLDatabaseImplementation mySQLDatabaseImplementation;

	private static final List prerequisites = Arrays.asList("database");

	@Inject
	public void setDatabaseFeatureModule(DatabaseFeatureModule module)
	{
		databaseFeatureModule = module;
	}

	@Override
	public void dispose()
	{
		mySQLDatabaseImplementation.dispose();
	}

	@Override
	public List getPrerequisites() {
		return prerequisites;
	}

	public String getFeatureName() {
		return "mysql-database";
	}

	@Override
	public void initialize(Injector inj)
	{
		mySQLDatabaseImplementation = postCreate(new MySQLDatabaseImplementation());
		databaseFeatureModule.addDatabaseImplementation(mySQLDatabaseImplementation);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy