assertTrue(!iter.hasNext());
assertTrue(!pm.select("IPADDRESS='192.168.5.128'").hasNext());
}
public void testUpdate() throws Exception {
PM pm = getPM();
Iterator iter = pm.select("IPADDRESS='192.168.5.127'");
Session session = (Session) iter.next();
session.setIpAddress("192.168.5.128");
pm.update(session);
assertTrue(!pm.select("IPADDRESS='192.168.5.127'").hasNext());
iter = pm.select("IPADDRESS='192.168.5.128'");
assertTrue(iter.hasNext());
session = (Session) iter.next();
assertEquals("192.168.5.128", session.getIpAddress());
assertEquals(2, session.getID());
assertTrue(!iter.hasNext());
iter = pm.select("IPADDRESS='192.168.5.128'");
session = (Session) iter.next();
session.setIpAddress("192.168.5.127");
pm.update(session);
testSelect();
}