use of indi.mybatis.flying.pojo.condition.Account_Condition in project mybatis.flying by limeng32.
the class OrTest method testOr6.
/* 一个只有单独入参的或逻辑测试用例 */
@Test
@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = "/indi/mybatis/flying/test/orTest/testOr6.xml")
@ExpectedDatabase(assertionMode = DatabaseAssertionMode.NON_STRICT, value = "/indi/mybatis/flying/test/orTest/testOr6.result.xml")
@DatabaseTearDown(type = DatabaseOperation.DELETE_ALL, value = "/indi/mybatis/flying/test/orTest/testOr6.result.xml")
public void testOr6() {
LoginLog_Condition lc = new LoginLog_Condition();
lc.setAccount(new Account_Condition());
lc.getAccount().setRole(new Role_Condition());
((Role_Condition) lc.getAccount().getRole()).setAccountNameEquals("ann");
int i = loginLogService.count(lc);
Assert.assertEquals(2, i);
LoginLog_Condition lc2 = new LoginLog_Condition();
lc2.setAccount(new Account_Condition());
lc2.getAccount().setRole(new Role_Condition());
((Role_Condition) lc2.getAccount().getRole()).setNameEquals("admin");
int i2 = loginLogService.count(lc2);
Assert.assertEquals(4, i2);
}
Aggregations