1/* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18package org.apache.harmony.sql.tests.java.sql; 19 20import static java.sql.DatabaseMetaData.*; 21 22import junit.framework.TestCase; 23 24public class DatabaseMetaDataTest extends TestCase { 25 26 /* 27 * Public statics test 28 */ 29 public void testPublicStatics() { 30 assertEquals(attributeNoNulls, 0); 31 assertEquals(attributeNullable, 1); 32 assertEquals(attributeNullableUnknown, 2); 33 assertEquals(bestRowNotPseudo, 1); 34 assertEquals(bestRowPseudo, 2); 35 assertEquals(bestRowSession, 2); 36 assertEquals(bestRowTemporary, 0); 37 assertEquals(bestRowTransaction, 1); 38 assertEquals(bestRowUnknown, 0); 39 assertEquals(columnNoNulls, 0); 40 assertEquals(columnNullable, 1); 41 assertEquals(columnNullableUnknown, 2); 42 assertEquals(functionColumnIn, 1); 43 assertEquals(functionColumnInOut, 2); 44 assertEquals(functionColumnOut, 3); 45 assertEquals(functionColumnResult, 5); 46 assertEquals(functionColumnUnknown, 0); 47 assertEquals(functionNoNulls, 0); 48 assertEquals(functionNoTable, 1); 49 assertEquals(functionNullable, 1); 50 assertEquals(functionNullableUnknown, 2); 51 assertEquals(functionResultUnknown, 0); 52 assertEquals(functionReturn, 4); 53 assertEquals(functionReturnsTable, 2); 54 assertEquals(importedKeyCascade, 0); 55 assertEquals(importedKeyInitiallyDeferred, 5); 56 assertEquals(importedKeyInitiallyImmediate, 6); 57 assertEquals(importedKeyNoAction, 3); 58 assertEquals(importedKeyNotDeferrable, 7); 59 assertEquals(importedKeyRestrict, 1); 60 assertEquals(importedKeySetDefault, 4); 61 assertEquals(importedKeySetNull, 2); 62 assertEquals(procedureColumnIn, 1); 63 assertEquals(procedureColumnInOut, 2); 64 assertEquals(procedureColumnOut, 4); 65 assertEquals(procedureColumnResult, 3); 66 assertEquals(procedureColumnReturn, 5); 67 assertEquals(procedureColumnUnknown, 0); 68 assertEquals(procedureNoNulls, 0); 69 assertEquals(procedureNoResult, 1); 70 assertEquals(procedureNullable, 1); 71 assertEquals(procedureNullableUnknown, 2); 72 assertEquals(procedureResultUnknown, 0); 73 assertEquals(procedureReturnsResult, 2); 74 assertEquals(sqlStateSQL, 2); 75 assertEquals(sqlStateSQL99, 2); 76 assertEquals(sqlStateXOpen, 1); 77 assertEquals(tableIndexClustered, 1); 78 assertEquals(tableIndexHashed, 2); 79 assertEquals(tableIndexOther, 3); 80 assertEquals(tableIndexStatistic, 0); 81 assertEquals(typeNoNulls, 0); 82 assertEquals(typeNullable, 1); 83 assertEquals(typeNullableUnknown, 2); 84 assertEquals(typePredBasic, 2); 85 assertEquals(typePredChar, 1); 86 assertEquals(typePredNone, 0); 87 assertEquals(typeSearchable, 3); 88 assertEquals(versionColumnNotPseudo, 1); 89 assertEquals(versionColumnPseudo, 2); 90 assertEquals(versionColumnUnknown, 0); 91 } 92} 93