DerbyParameterMapTest.java :  » Database-ORM » iBATIS » com » ibatis » sqlmap » Java Open Source

Java Open Source » Database ORM » iBATIS 
iBATIS » com » ibatis » sqlmap » DerbyParameterMapTest.java
package com.ibatis.sqlmap;

import testdomain.Account;

import java.sql.SQLException;

/**
 * TestCase for validating PreparedStatement.setNull calls for Derby.
 * See IBATIS-536 for more information.
 */
public class DerbyParameterMapTest extends ParameterMapTest {

  // SETUP & TEARDOWN

  protected void setUp() throws Exception {
    initSqlMap("com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml", null);
    initScript("scripts/account-init.sql");
  }

  // PARAMETER MAP FEATURE TESTS

  protected void assertMessageIsNullValueNotAllowed(String message) {
    assertTrue("Invalid exception message", message.indexOf("Column 'ACC_ID'  cannot accept a NULL value.") > -1);
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.