assertEquals(7, b.countFighter(Fighter.TYPE.F22));
}
@Test
public void update_with() {
Base b = dao.fetchLinks(dao.fetch(Base.class, "blue"), "fighters");
b.setLevel(45);
for (Iterator<Fighter> it = b.getFighters().iterator(); it.hasNext();) {
it.next().setType(Fighter.TYPE.F22);
}
dao.updateWith(b, "fighters");
b = dao.fetch(Base.class, "blue");
assertEquals(45, b.getLevel());
b = dao.fetchLinks(dao.fetch(Base.class, "blue"), "fighters");
assertEquals(7, b.countFighter(Fighter.TYPE.F22));
}