1c3ab0d6aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3c3ab0d6aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4c3ab0d6aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5c3ab0d6aSAndrew Rist * distributed with this work for additional information 6c3ab0d6aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7c3ab0d6aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8c3ab0d6aSAndrew Rist * "License"); you may not use this file except in compliance 9c3ab0d6aSAndrew Rist * with the License. You may obtain a copy of the License at 10c3ab0d6aSAndrew Rist * 11c3ab0d6aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12c3ab0d6aSAndrew Rist * 13c3ab0d6aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14c3ab0d6aSAndrew Rist * software distributed under the License is distributed on an 15c3ab0d6aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16c3ab0d6aSAndrew Rist * KIND, either express or implied. See the License for the 17c3ab0d6aSAndrew Rist * specific language governing permissions and limitations 18c3ab0d6aSAndrew Rist * under the License. 19c3ab0d6aSAndrew Rist * 20c3ab0d6aSAndrew Rist *************************************************************/ 21c3ab0d6aSAndrew Rist 22c3ab0d6aSAndrew Rist 23cdf0e10cSrcweir package complex.connectivity; 24cdf0e10cSrcweir 25cdf0e10cSrcweir import complex.connectivity.dbase.DBaseDateFunctions; 26cdf0e10cSrcweir import complex.connectivity.dbase.DBaseStringFunctions; 27cdf0e10cSrcweir import complex.connectivity.dbase.DBaseSqlTests; 28cdf0e10cSrcweir import complex.connectivity.dbase.DBaseNumericFunctions; 29cdf0e10cSrcweir import com.sun.star.lang.XMultiServiceFactory; 30*fcc38b58SDamjan Jovanovic import com.sun.star.uno.UnoRuntime; 31cdf0e10cSrcweir 32*fcc38b58SDamjan Jovanovic import org.junit.After; 33*fcc38b58SDamjan Jovanovic import org.junit.AfterClass; 34*fcc38b58SDamjan Jovanovic import org.junit.Before; 35*fcc38b58SDamjan Jovanovic import org.junit.BeforeClass; 36*fcc38b58SDamjan Jovanovic import org.junit.Test; 37*fcc38b58SDamjan Jovanovic import static org.junit.Assert.*; 38*fcc38b58SDamjan Jovanovic import org.openoffice.test.Argument; 39*fcc38b58SDamjan Jovanovic import org.openoffice.test.OfficeConnection; 40cdf0e10cSrcweir 41*fcc38b58SDamjan Jovanovic public class DBaseDriverTest 42*fcc38b58SDamjan Jovanovic { 43*fcc38b58SDamjan Jovanovic private static final OfficeConnection connection = new OfficeConnection(); 44cdf0e10cSrcweir 45*fcc38b58SDamjan Jovanovic @BeforeClass beforeClass()46*fcc38b58SDamjan Jovanovic public static void beforeClass() throws Exception { 47*fcc38b58SDamjan Jovanovic connection.setUp(); 48cdf0e10cSrcweir } 49cdf0e10cSrcweir 50*fcc38b58SDamjan Jovanovic @AfterClass afterClass()51*fcc38b58SDamjan Jovanovic public static void afterClass() throws Exception { 52*fcc38b58SDamjan Jovanovic connection.tearDown(); 53cdf0e10cSrcweir } 54cdf0e10cSrcweir 55*fcc38b58SDamjan Jovanovic @Test Functions()56cdf0e10cSrcweir public void Functions() throws com.sun.star.uno.Exception, com.sun.star.beans.UnknownPropertyException 57cdf0e10cSrcweir { 58*fcc38b58SDamjan Jovanovic XMultiServiceFactory xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager()); 59*fcc38b58SDamjan Jovanovic 60*fcc38b58SDamjan Jovanovic DBaseStringFunctions aStringTest = new DBaseStringFunctions(xMSF); 61cdf0e10cSrcweir aStringTest.testFunctions(); 62cdf0e10cSrcweir 63*fcc38b58SDamjan Jovanovic DBaseNumericFunctions aNumericTest = new DBaseNumericFunctions(xMSF); 64cdf0e10cSrcweir aNumericTest.testFunctions(); 65cdf0e10cSrcweir 66*fcc38b58SDamjan Jovanovic DBaseDateFunctions aDateTest = new DBaseDateFunctions(xMSF); 67cdf0e10cSrcweir aDateTest.testFunctions(); 68cdf0e10cSrcweir 69*fcc38b58SDamjan Jovanovic DBaseSqlTests aSqlTest = new DBaseSqlTests(xMSF); 70cdf0e10cSrcweir aSqlTest.testFunctions(); 71cdf0e10cSrcweir } 72cdf0e10cSrcweir } 73