public void Group_RemoveGroup_ByID()
        {
            BasicGroup targetGroup = new BasicGroup(TestConstants.anID, TestConstants.aName);
            BasicGroup subgroup    = new BasicGroup("aa", "aa");

            targetGroup.AddGroup(subgroup);
            targetGroup.RemoveGroup("aa");

            TestUtilities.checkEmpty(targetGroup.Groups, "Groups");
        }
        public void Group_RemoveGroup_NonexistentID()
        {
            BasicGroup           targetGroup       = new BasicGroup(TestConstants.anID, TestConstants.aName);
            KeyNotFoundException expectedException = null;

            try
            {
                targetGroup.RemoveGroup(TestConstants.anID);
            }
            catch (KeyNotFoundException e)
            {
                expectedException = e;
            }

            Assert.IsNotNull(expectedException, "KeyNotFoundException not thrown");
            TestUtilities.checkEmpty(targetGroup.Groups, "Groups");
        }
        public void Group_RemoveGroup_NullID()
        {
            BasicGroup            targetGroup       = new BasicGroup(TestConstants.anID, TestConstants.aName);
            ArgumentNullException expectedException = null;

            try
            {
                targetGroup.RemoveGroup((string)null);
            }
            catch (ArgumentNullException e)
            {
                expectedException = e;
            }

            TestUtilities.checkException(expectedException);
            TestUtilities.checkEmpty(targetGroup.Groups, "Groups");
        }
        public void Group_RemoveGroup_NullGroup()
        {
            BasicGroup            targetGroup       = new BasicGroup(TestConstants.anID, TestConstants.aName);
            ArgumentNullException expectedException = null;

            try
            {
                targetGroup.RemoveGroup((IGroup)null);
            }
            catch (ArgumentNullException e)
            {
                expectedException = e;
            }

            Assert.IsNotNull(expectedException, "ArgumentNullException not thrown");
            TestUtilities.checkEmpty(targetGroup.Groups, "Groups");
        }