FolderEntity php = addFolder("php", services);
addPermission(home, guests, FolderPermissionType.READ);
addPermission(about, guests, FolderPermissionType.DENIED);
addPermission(about, developers, FolderPermissionType.READ);
addPermission(team, developers, FolderPermissionType.WRITE);
FolderPermissionEntity p = getBusiness().getFolderPermissionBusiness()
.getPermission(home, developer);
assertEquals(FolderPermissionType.READ, p.getPermission());
p = getBusiness().getFolderPermissionBusiness().getPermission(
about, developer);
assertEquals(FolderPermissionType.READ, p.getPermission());
p = getBusiness().getFolderPermissionBusiness().getPermission(
team, developer);
assertEquals(FolderPermissionType.WRITE, p.getPermission());
p = getBusiness().getFolderPermissionBusiness().getGuestPermission(
home);
assertEquals(FolderPermissionType.READ, p.getPermission());
p = getBusiness().getFolderPermissionBusiness().getGuestPermission(
about);
assertEquals(FolderPermissionType.DENIED, p.getPermission());
p = getBusiness().getFolderPermissionBusiness().getGuestPermission(
team);
assertEquals(FolderPermissionType.DENIED, p.getPermission());
p = getBusiness().getFolderPermissionBusiness().getGuestPermission(
services);
assertEquals(FolderPermissionType.READ, p.getPermission());
p = getBusiness().getFolderPermissionBusiness().getGuestPermission(
php);
assertEquals(FolderPermissionType.READ, p.getPermission());
}