Esempio n. 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());
  }
Esempio n. 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);
  }
Esempio n. 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());
 }