示例#1
0
  @Test
  public void testGetIndexEntryByObjectKey() throws SQLException {

    Connection connection = null;
    try {
      ConnectionManager connectionManager = temporaryFileDatabase.getConnectionManager(true);
      initWithTestData(connectionManager);

      connection = connectionManager.getConnection(null);
      ResultSet resultSet = DBQueries.getIndexEntryByObjectKey(3, NAME, connection);

      List<DBQueries.Row<Integer, String>> expectedRows =
          new ArrayList<DBQueries.Row<Integer, String>>(2);
      expectedRows.add(new DBQueries.Row<Integer, String>(3, "abs"));

      assertResultSetOrderAgnostic(resultSet, expectedRows);

    } finally {
      DBUtils.closeQuietly(connection);
    }
  }