コード例 #1
0
  @Test
  @DataSet
  public void testUpdateAccount() {
    Account account = new Account();
    account.setId(1);
    account.setAccountname("abc");
    account.setSaccountid(1);
    accountService.updateWithSession(account, "hai79");

    accountService.findById(1, 1);
    Assert.assertEquals("abc", account.getAccountname());
  }
コード例 #2
0
  @Test
  @DataSet
  public void testUpdateAccount() {
    Account account = new Account();
    account.setId(1);
    account.setAccountname("abc");
    account.setSaccountid(1);
    accountService.updateWithSession(account, "hai79");

    SimpleAccount simpleAccount = accountService.findById(1, 1);
    assertThat(simpleAccount.getAccountname()).isEqualTo("abc");
    assertThat(simpleAccount.getIndustry()).isEqualTo(null);
  }
コード例 #3
0
 @DataSet
 @Test
 public void testSaveAccount() {
   List accountList =
       accountService.findPagableListByCriteria(
           new SearchRequest<AccountSearchCriteria>(
               new AccountSearchCriteria(), 0, Integer.MAX_VALUE));
   System.out.println("List: " + accountList.size());
   Account account = new Account();
   account.setAccountname("aaa");
   account.setSaccountid(1);
   accountService.saveWithSession(account, "aaa");
   accountList =
       accountService.findPagableListByCriteria(
           new SearchRequest<AccountSearchCriteria>(
               new AccountSearchCriteria(), 0, Integer.MAX_VALUE));
   System.out.println("List: " + accountList.size());
 }