Examples of PreparedStatementStub


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

    }
  }

  @Test
  public final void testSetObject() {
    PreparedStatementStub pstmt = new PreparedStatementStub();
    StringDataMapper dm = new StringDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, "1234");
      assertEquals("setString(123, java.lang.String)", 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();
    BooleanDataMapper dm = new BooleanDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, Boolean.valueOf(true));
      assertEquals("setBoolean(123, boolean)", 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();
    OtherDataMapper dm = new OtherDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, "1234");
      assertEquals("setString(123, java.lang.String)", 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();
    StructDataMapper dm = new StructDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new StructStub());
      assertEquals("setObject(123, jp.co.ntt.oss.mapper.stub.StructStub)", 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();
    BytesDataMapper dm = new BytesDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new byte[1234]);
      assertEquals("setBytes(123, byte[])", 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();
    RefDataMapper dm = new RefDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new RefStub());
      assertEquals("setRef(123, jp.co.ntt.oss.mapper.stub.RefStub)", 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();
    BlobDataMapper dm = new BlobDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new BlobStub());
      assertEquals("setBlob(123, jp.co.ntt.oss.mapper.stub.BlobStub)", 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();
    DateDataMapper dm = new DateDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new Date(1234));
      assertEquals("setDate(123, java.sql.Date)", 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();
    DoubleDataMapper dm = new DoubleDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, new Double(1234));
      assertEquals("setDouble(123, double)", pstmt.getCalled());
      dm.setObject(pstmt, 123, null);
      assertEquals("setNull(123, 8)", 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();
    ObjectDataMapper dm = new ObjectDataMapper();
    assertNotNull(dm);
    try {
      dm.setObject(pstmt, 123, "1234");
      assertEquals("setObject(123, java.lang.String)", 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.