use of cz.metacentrum.perun.core.api.BanOnVo in project perun by CESNET.
the class VosManagerImplIntegrationTest method setBan.
@Test
public void setBan() throws Exception {
System.out.println(CLASS_NAME + "setBan");
BanOnVo originBan = new BanOnVo(-1, member.getId(), vo.getId(), new Date(), "noob");
originBan = vosManagerImpl.setBan(sess, originBan);
BanOnVo actualBan = vosManagerImpl.getBanForMember(sess, originBan.getMemberId());
assertThat(originBan).isEqualTo(actualBan);
}
use of cz.metacentrum.perun.core.api.BanOnVo in project perun by CESNET.
the class VosManagerImplIntegrationTest method testUpdateBan.
private void testUpdateBan(Consumer<BanOnVo> banChange) throws Exception {
BanOnVo originBan = new BanOnVo(-1, member.getId(), vo.getId(), new Date(), "noob");
originBan = vosManagerImpl.setBan(sess, originBan);
originBan = vosManagerImpl.getBanById(sess, originBan.getId());
banChange.accept(originBan);
vosManagerImpl.updateBan(sess, originBan);
BanOnVo updatedBan = vosManagerImpl.getBanById(sess, originBan.getId());
assertThat(updatedBan).isEqualByComparingTo(originBan);
}
Aggregations