コード例 #1
0
  @Test()
  public void testAppendToClause() {
    StringBuilder sb = new StringBuilder();

    classUnderTest.appendToClause(sb);
    assertEquals(" WHERE myCol is null", sb.toString());

    classUnderTest.appendToClause(sb);

    assertEquals(" WHERE myCol is null AND myCol is null", sb.toString());
  }
コード例 #2
0
 @Test()
 public void testIsParameterUsed() {
   assertFalse(classUnderTest.isParameterUsed());
 }
コード例 #3
0
 @Test
 public void testShouldBeUsed() {
   assertTrue(classUnderTest.shouldBeUsed());
 }
コード例 #4
0
 @Test()
 public void testGetWhereClause() {
   assertEquals("myCol is null", classUnderTest.getWhereClause());
 }
コード例 #5
0
 @Test(expected = IllegalStateException.class)
 public void testSetParameter() throws Exception {
   classUnderTest.setParameter(mockPstmt, 1);
 }