Package org.apache.xindice

Source Code of org.apache.xindice.IntegrationUncompressedTests

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
* $Id: IntegrationUncompressedTests.java 512591 2007-02-28 03:35:44Z vgritsenko $
*/

package org.apache.xindice;

import org.apache.xindice.integration.IntegrationTests;
import org.apache.xindice.integration.client.XmlDbClient;
import org.apache.xindice.integration.client.XmlDbClientSetup;

import junit.framework.Test;
import junitx.extensions.TestSetup;
import org.xmldb.api.DatabaseManager;
import org.xmldb.api.base.Database;

/**
* @version $Revision: 512591 $, $Date: 2007-02-27 22:35:44 -0500 (Tue, 27 Feb 2007) $
*/
public class IntegrationUncompressedTests {

    public static Test suite() throws Exception {

        return new TestSetup(
            new XmlDbClientSetup(
                IntegrationTests.testSuite("Embed client uncompressed database integration tests"),
                new XmlDbClient("xmldb:xindice-embed://", false))) {

            private Database database;

            public void setUp() throws Exception {
                String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
                Class cls = Class.forName(driver);

                database = (Database) cls.newInstance();
                DatabaseManager.registerDatabase(database);
            }

            public void tearDown() throws Exception {
                if (database != null) {
                    DatabaseManager.deregisterDatabase(database);
                }
            }
        };
    }
}
TOP

Related Classes of org.apache.xindice.IntegrationUncompressedTests

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.