use of indi.mybatis.flying.pojo.condition.Account_Condition3 in project mybatis.flying by limeng32.
the class ConditionTest method testConditionHeadLike.
/**
* 测试condition:headLike功能
*/
@Test
@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = "/indi/mybatis/flying/test/conditionTest/testConditionHeadLike.xml")
@DatabaseTearDown(type = DatabaseOperation.DELETE_ALL, value = "/indi/mybatis/flying/test/conditionTest/testConditionHeadLike.xml")
public void testConditionHeadLike() {
Account_Condition ac = new Account_Condition();
ac.setEmailHeadLike("ann");
Collection<Account_> c = accountService.selectAll(ac);
Account_[] accounts = c.toArray(new Account_[c.size()]);
Assert.assertEquals(1, accounts.length);
Assert.assertEquals("ann@live.cn2", accounts[0].getEmail());
Account_Condition3 ac2 = new Account_Condition3();
ac2.setEmailHeadLike("1");
Collection<Account_> c2 = accountService.selectAll(ac2);
Account_[] accounts2 = c2.toArray(new Account_[c2.size()]);
Assert.assertEquals(1, accounts2.length);
Assert.assertEquals("_ann@live.cn1", accounts2[0].getEmail());
}
Aggregations