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

it.openutils.testing.junit.AbstractDbUnitJunitSpringContextTests Maven / Gradle / Ivy

There is a newer version: 2.2.3
Show newest version
/*
 * Copyright Openmind http://www.openmindonline.it
 *
 * 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 it.openutils.testing.junit;

import it.openutils.testing.DbUnitTestContext;

import org.junit.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;


/**
 * @author fgiust
 * @version $Id: AbstractDbUnitJunitSpringContextTests.java 925 2008-11-10 15:26:41Z fgiust $
 */
public class AbstractDbUnitJunitSpringContextTests extends AbstractJUnit4SpringContextTests
{

    /**
     * Slf4j logger that can be reused in subclasses.
     */
    protected Logger log = LoggerFactory.getLogger(getClass());

    /**
     * DBUnit text context.
     */
    protected DbUnitTestContext dbUnitTestContext;

    /**
     * Setup the Database before running the test method.
     * @throws Exception Any exception.
     */
    @Before
    public void setUpDbUnit() throws Exception
    {
        dbUnitTestContext = new DbUnitTestContext(this, applicationContext);
        dbUnitTestContext.setUpDbUnit();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy