@Test public void testCreateCmdForRoleAddOrDeleteGroup1() { String createRoleAddGroupCmdResult = CommandUtil.createCmdForRoleAddGroup("testRole", getGroupStr(1)); String createRoleAddGroupCmdExcepted = "GRANT ROLE testRole TO GROUP testGroup1"; String createRoleDeleteGroupCmdResult = CommandUtil.createCmdForRoleDeleteGroup("testRole", getGroupStr(1)); String createRoleDeleteGroupCmdExcepted = "REVOKE ROLE testRole FROM GROUP testGroup1"; assertEquals(createRoleAddGroupCmdExcepted, createRoleAddGroupCmdResult); assertEquals(createRoleDeleteGroupCmdExcepted, createRoleDeleteGroupCmdResult); }
@Test public void testCreateCmdForRoleAddOrDeleteGroup2() { String createRoleAddGroupCmdResult = CommandUtil.createCmdForRoleAddGroup("testRole", getGroupStr(3)); String createRoleAddGroupCmdExcepted = "GRANT ROLE testRole TO GROUP testGroup1, testGroup2, testGroup3"; String createRoleDeleteGroupCmdResult = CommandUtil.createCmdForRoleDeleteGroup("testRole", getGroupStr(3)); String createRoleDeleteGroupCmdExcepted = "REVOKE ROLE testRole FROM GROUP testGroup1, testGroup2, testGroup3"; assertEquals(createRoleAddGroupCmdExcepted, createRoleAddGroupCmdResult); assertEquals(createRoleDeleteGroupCmdExcepted, createRoleDeleteGroupCmdResult); }
@Test public void testCreateCmdForRoleAddOrDeleteGroup1() { String createRoleAddGroupCmdResult = CommandUtil.createCmdForRoleAddGroup("testRole", getGroupStr(1)); String createRoleAddGroupCmdExcepted = "GRANT ROLE testRole TO GROUP testGroup1"; String createRoleDeleteGroupCmdResult = CommandUtil.createCmdForRoleDeleteGroup("testRole", getGroupStr(1)); String createRoleDeleteGroupCmdExcepted = "REVOKE ROLE testRole FROM GROUP testGroup1"; assertEquals(createRoleAddGroupCmdExcepted, createRoleAddGroupCmdResult); assertEquals(createRoleDeleteGroupCmdExcepted, createRoleDeleteGroupCmdResult); }
@Test public void testCreateCmdForRoleAddOrDeleteGroup2() { String createRoleAddGroupCmdResult = CommandUtil.createCmdForRoleAddGroup("testRole", getGroupStr(3)); String createRoleAddGroupCmdExcepted = "GRANT ROLE testRole TO GROUP testGroup1, testGroup2, testGroup3"; String createRoleDeleteGroupCmdResult = CommandUtil.createCmdForRoleDeleteGroup("testRole", getGroupStr(3)); String createRoleDeleteGroupCmdExcepted = "REVOKE ROLE testRole FROM GROUP testGroup1, testGroup2, testGroup3"; assertEquals(createRoleAddGroupCmdExcepted, createRoleAddGroupCmdResult); assertEquals(createRoleDeleteGroupCmdExcepted, createRoleDeleteGroupCmdResult); }