/external/apache-harmony/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.java

https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk · Java · 92 lines · 68 code · 5 blank · 19 comment · 0 complexity · c8c867301f36f7f6c618f44de43be66d MD5 · raw file

  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. package org.apache.harmony.sql.tests.java.sql;
  18. import static java.sql.DatabaseMetaData.*;
  19. import junit.framework.TestCase;
  20. public class DatabaseMetaDataTest extends TestCase {
  21. /*
  22. * Public statics test
  23. */
  24. public void testPublicStatics() {
  25. assertEquals(attributeNoNulls, 0);
  26. assertEquals(attributeNullable, 1);
  27. assertEquals(attributeNullableUnknown, 2);
  28. assertEquals(bestRowNotPseudo, 1);
  29. assertEquals(bestRowPseudo, 2);
  30. assertEquals(bestRowSession, 2);
  31. assertEquals(bestRowTemporary, 0);
  32. assertEquals(bestRowTransaction, 1);
  33. assertEquals(bestRowUnknown, 0);
  34. assertEquals(columnNoNulls, 0);
  35. assertEquals(columnNullable, 1);
  36. assertEquals(columnNullableUnknown, 2);
  37. assertEquals(functionColumnIn, 1);
  38. assertEquals(functionColumnInOut, 2);
  39. assertEquals(functionColumnOut, 3);
  40. assertEquals(functionColumnResult, 5);
  41. assertEquals(functionColumnUnknown, 0);
  42. assertEquals(functionNoNulls, 0);
  43. assertEquals(functionNoTable, 1);
  44. assertEquals(functionNullable, 1);
  45. assertEquals(functionNullableUnknown, 2);
  46. assertEquals(functionResultUnknown, 0);
  47. assertEquals(functionReturn, 4);
  48. assertEquals(functionReturnsTable, 2);
  49. assertEquals(importedKeyCascade, 0);
  50. assertEquals(importedKeyInitiallyDeferred, 5);
  51. assertEquals(importedKeyInitiallyImmediate, 6);
  52. assertEquals(importedKeyNoAction, 3);
  53. assertEquals(importedKeyNotDeferrable, 7);
  54. assertEquals(importedKeyRestrict, 1);
  55. assertEquals(importedKeySetDefault, 4);
  56. assertEquals(importedKeySetNull, 2);
  57. assertEquals(procedureColumnIn, 1);
  58. assertEquals(procedureColumnInOut, 2);
  59. assertEquals(procedureColumnOut, 4);
  60. assertEquals(procedureColumnResult, 3);
  61. assertEquals(procedureColumnReturn, 5);
  62. assertEquals(procedureColumnUnknown, 0);
  63. assertEquals(procedureNoNulls, 0);
  64. assertEquals(procedureNoResult, 1);
  65. assertEquals(procedureNullable, 1);
  66. assertEquals(procedureNullableUnknown, 2);
  67. assertEquals(procedureResultUnknown, 0);
  68. assertEquals(procedureReturnsResult, 2);
  69. assertEquals(sqlStateSQL, 2);
  70. assertEquals(sqlStateSQL99, 2);
  71. assertEquals(sqlStateXOpen, 1);
  72. assertEquals(tableIndexClustered, 1);
  73. assertEquals(tableIndexHashed, 2);
  74. assertEquals(tableIndexOther, 3);
  75. assertEquals(tableIndexStatistic, 0);
  76. assertEquals(typeNoNulls, 0);
  77. assertEquals(typeNullable, 1);
  78. assertEquals(typeNullableUnknown, 2);
  79. assertEquals(typePredBasic, 2);
  80. assertEquals(typePredChar, 1);
  81. assertEquals(typePredNone, 0);
  82. assertEquals(typeSearchable, 3);
  83. assertEquals(versionColumnNotPseudo, 1);
  84. assertEquals(versionColumnPseudo, 2);
  85. assertEquals(versionColumnUnknown, 0);
  86. }
  87. }