We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Slf4j @RunWith(SpringRunner.class) @SpringBootTest public class AccountServiceTest { @Autowired private AccountService accountService; @Test public void createAccount() { Account account = new Account(); account.setEmail("[email protected]"); account.setFirstName("gr"); account.setLastName("yang"); account.setPassword("xxxxxxx"); accountService.createAccount(account); List<Account> accounts = accountService.listAccounts(); accounts.forEach(a -> log.info("{}", a)); Assert.assertEquals(accounts.size(), 1); } @Test public void listAccounts() { List<Account> accounts = accountService.listAccounts(); accounts.forEach(a -> log.info("{}", a)); Assert.assertEquals(accounts.size(), 0); } }
使用的是h2数据库,两个Test方法没有相互影响。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
集成测试
使用的是h2数据库,两个Test方法没有相互影响。
The text was updated successfully, but these errors were encountered: