Package com.testdomain

Examples of com.testdomain.Account


    assertAccount6(account);
  }

  public void testNullParameter() throws SQLException {

    Account account = (Account) sqlMap.queryForObject("getAccountNullParameter", null);


    assertNull(account);
  }
View Full Code Here


    assertNull(account);
  }

  public void testNullParameter2() throws SQLException {

    Account account = (Account) sqlMap.queryForObject("getAccountNullParameter");


    assertNull(account);
  }
View Full Code Here

    conn.close();
    reader.close();
  }

  protected Account newAccount6() {
    Account account = new Account();
    account.setId(6);
    account.setFirstName("Jennifer");
    account.setLastName("Begin");
    account.setEmailAddress("no_email@provided.com");
    account.setBannerOption(true);
    account.setCartOption(true);
    return account;
  }
View Full Code Here

  }

  // OBJECT QUERY TESTS

  public void testExecuteQueryForObjectViaColumnName() throws SQLException {
    Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", new Integer(1));
    assertAccount1(account);
  }
View Full Code Here

  public void testUserConnection() throws SQLException {
    DataSource ds = sqlMap.getDataSource();
    Connection conn = ds.getConnection();
    ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(null);
    sqlMap.setUserConnection(conn);
    Account account = (Account) sqlMap.queryForObject("getAccountViaColumnName", new Integer(1));
    conn.close();
    assertAccount1(account);
    ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(ds);
  }
View Full Code Here

  public void testSessionUserConnection() throws SQLException {
    DataSource ds = sqlMap.getDataSource();
    Connection conn = ds.getConnection();
    ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(null);
    SqlMapSession session = sqlMap.openSession(conn);
    Account account = (Account) session.queryForObject("getAccountViaColumnName", new Integer(1));
    session.close();
    conn.close();
    assertAccount1(account);
    ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(ds);
  }
View Full Code Here

        expected = e;
      }
      assertNotNull("Expected exception from startTransaction() was not detected.", expected);
      expected = null;

      Account account = (Account) session.queryForObject("getAccountViaColumnName", new Integer(1));
      session.close();
      conn.close();
      assertAccount1(account);
    } finally {
      ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(ds);
View Full Code Here

      ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(ds);
    }
  }

  public void testExecuteQueryForObjectViaColumnIndex() throws SQLException {
    Account account = (Account) sqlMap.queryForObject("getAccountViaColumnIndex", new Integer(1));
    assertAccount1(account);
  }
View Full Code Here

    Account account = (Account) sqlMap.queryForObject("getAccountViaColumnIndex", new Integer(1));
    assertAccount1(account);
  }

  public void testExecuteQueryForObjectViaResultClass() throws SQLException {
    Account account = (Account) sqlMap.queryForObject("getAccountViaResultClass", new Integer(1));
    assertAccount1(account);
  }
View Full Code Here

    Account account = (Account) sqlMap.queryForObject("getAccountViaResultClass", new Integer(1));
    assertAccount1(account);
  }

  public void testExecuteQueryForObjectViaResultClassIgnoreCaseTypeAliasCase() throws SQLException {
    Account account = (Account) sqlMap.queryForObject("getAccountViaResultClassIgnoreCaseTypeAlias", new Integer(1));
    assertAccount1(account);
  }
View Full Code Here

TOP

Related Classes of com.testdomain.Account

Copyright © 2018 www.massapicom. 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.