<commit_before>package org.fedorahosted.flies.rest.service;

import org.jboss.seam.mock.DBUnitSeamTest;
import org.testng.annotations.BeforeMethod;

public abstract class FliesDBUnitSeamTest extends DBUnitSeamTest {

	private boolean databaseSet;
	private boolean jndiNameSet;
	private boolean binaryDirSet;
	
	@Override
	@BeforeMethod
	public void prepareDataBeforeTest() {
		setDatabaseParameters();
		super.prepareDataBeforeTest();
	}

	public void setDatabaseParameters() {
		if(!binaryDirSet)
			setBinaryDir("");
		if (!databaseSet)
			setDatabase("hsql");
		if (!jndiNameSet)
			setDatasourceJndiName("java:/fliesDatasource");
	}
	
	@Override
	public void setBinaryDir(String binaryDir) {
		super.setBinaryDir(binaryDir);
		binaryDirSet = true;
	}
	
	@Override
	public void setDatabase(String database) {
		super.setDatabase(database);
		databaseSet = true;
	}
	
	@Override
	public void setDatasourceJndiName(String datasourceJndiName) {
		super.setDatasourceJndiName(datasourceJndiName);
		jndiNameSet = true;
	}
}<commit_msg>Default database parameters now handled by TestNG mechanisms<commit_after>package org.fedorahosted.flies.rest.service;

import org.jboss.seam.mock.DBUnitSeamTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Optional;
import org.testng.annotations.Parameters;

public abstract class FliesDBUnitSeamTest extends DBUnitSeamTest {

	@BeforeClass
	@Parameters("datasourceJndiName")
	public void setDatasourceJndiName(@Optional("java:/fliesDatasource") String datasourceJndiName)
	{
		super.setDatasourceJndiName(datasourceJndiName);
	}

	@BeforeClass
	@Parameters("binaryDir")
	public void setBinaryDir(@Optional("") String binaryDir)
	{
		super.setBinaryDir(binaryDir);
	}

	@BeforeClass
	@Parameters("database")
	public void setDatabase(@Optional("hsql") String database)
	{
		super.setDatabase(database);
	}

}
{'fraction_non_alphanumeric': 0.09834313201496526, 'fraction_numerical': 0.0, 'mean_word_length': 6.284046692607004, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2501396', 'n_tokens_mistral': 651, 'n_tokens_neox': 604, 'n_words': 110}