Examples of PreparedStatementStub


Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    FloatDataMapper dm = new FloatDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new Float(1234));
      assertEquals("setFloat(123, float)", pstmt.getCalled());
      dm.setObject(pstmt, 123, null);
      assertEquals("setNull(123, 7)", pstmt.getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    LongDataMapper dm = new LongDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new Long(1234));
      assertEquals("setLong(123, long)", pstmt.getCalled());
      dm.setObject(pstmt, 123, null);
      assertEquals("setNull(123, -5)", pstmt.getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    URLDataMapper dm = new URLDataMapper();
    assertNotNull(dm);
    try {
      try {
        dm.setObject(pstmt, 123, new URL(
            "https://www.oss.ecl.ntt.co.jp/"));
      } catch (MalformedURLException e) {
      }
      assertEquals("setURL(123, java.net.URL)", pstmt
          .getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    RowIdDataMapper dm = new RowIdDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new RowIdStub());
      assertEquals("setRowId(123, jp.co.ntt.oss.mapper.stub.RowIdStub)", pstmt
          .getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    TimeDataMapper dm = new TimeDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new Time(1234));
      assertEquals("setTime(123, java.sql.Time)", pstmt
          .getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    TimestampDataMapper dm = new TimestampDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new Timestamp(1234));
      assertEquals("setTimestamp(123, java.sql.Timestamp)",
          pstmt.getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    IntegerDataMapper dm = new IntegerDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new Integer(1234));
      assertEquals("setInt(123, int)", pstmt.getCalled());
      dm.setObject(pstmt, 123, null);
      assertEquals("setNull(123, 4)", pstmt.getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    NClobDataMapper dm = new NClobDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new NclobStub());
      assertEquals("setNClob(123, jp.co.ntt.oss.mapper.stub.NclobStub)", pstmt
          .getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    ClobDataMapper dm = new ClobDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new ClobStub());
      assertEquals("setClob(123, jp.co.ntt.oss.mapper.stub.ClobStub)", pstmt
          .getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here

Examples of jp.co.ntt.oss.mapper.stub.PreparedStatementStub

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    ArrayDataMapper dm = new ArrayDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new ArrayStub());
      assertEquals("setArray(123, jp.co.ntt.oss.mapper.stub.ArrayStub)", pstmt
          .getCalled());
    } catch (SQLException e) {
      fail("exception thrown");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.