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

org.modeshape.test.ModeShapeSingleUseTest Maven / Gradle / Ivy

/*
 * ModeShape (http://www.modeshape.org)
 *
 * 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 org.modeshape.test;

import org.junit.Before;
import org.modeshape.jcr.RepositoryConfiguration;
import org.modeshape.jcr.SingleUseAbstractTest;

/**
 * A base class for ModeShape integration tests that set up a new ModeShape engine for each unit test.
 * 

* There are two ways to run tests with this class: *

    *
  1. All tests runs against a fresh repository created from the same configuration. In this case, the * {@link #startRepositoryAutomatically} variable should be set to true, and the * {@link #createRepositoryConfiguration(String)} should be overridden if a non-default configuration is to be used * for all the tests.
  2. *
  3. Each test requires a fresh repository with a different configuration. In this case, the * {@link #startRepositoryAutomatically} variable should be set to false, and each test should then call one of the * {@link #startRepositoryWithConfiguration(RepositoryConfiguration)} methods before using the repository.
  4. *
*

*

* Classes can define a custom unit test {@link Before startup method}, but should always first call the {@link #beforeEach() * super.beforeEach()} method. Similarly, a custom unit test teardown method can be defined, but should always first call the * {@link #afterEach() super.afterEach()} method. *

*/ public abstract class ModeShapeSingleUseTest extends SingleUseAbstractTest { }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy