Ejemplo n.º 1
0
  // #ifdef JDK6
  @Test
  public void testSetClientInfo() {
    Properties prop = new Properties();
    try {
      mockConnection.setClientInfo(prop);
      replay(mockConnection);
      testClass.setClientInfo(prop);
      verify(mockConnection);

      reset(mockConnection);

      String name = "name";
      String value = "val";
      mockConnection.setClientInfo(name, value);
      replay(mockConnection);
      testClass.setClientInfo(name, value);
      verify(mockConnection);
    } catch (SQLClientInfoException e) {
      throw new RuntimeException(e);
    }
  }