示例#1
0
 /*
  * Validate that readObject returns the correct value
  */
 @Test()
 public void test05() throws Exception {
   Object[] values = {hero};
   SQLInputImpl sqli = new SQLInputImpl(values, map);
   Object o = sqli.readObject();
   assertTrue(hero.equals(o));
 }
示例#2
0
  /*
   * Validate that readObject returns the correct value when a Struct is
   * next on the stream
   */
  @Test()
  public void test11() throws Exception {
    Object[] attributes = new Object[] {"Bruce", "Wayne", 1939, "Batman"};
    map.put(sqlType, Class.forName("util.SuperHero"));
    Struct struct = new StubStruct(sqlType, attributes);
    Object[] values = {struct};
    SQLInputImpl sqli = new SQLInputImpl(values, map);
    Object o = sqli.readObject();

    assertTrue(hero.equals(o));
  }