/// <summary>
 /// This function is used to update the status of the groups.
 /// </summary>
 /// <param name="group">
 /// Instance of the group which has to be updated.
 /// </param>
 /// <param name="wwtGroups">
 /// List of WWT groups.
 /// </param>
 private static void UpdateGroupStatus(Group group, ICollection <Group> wwtGroups)
 {
     group.IsDeleted = !WWTManager.IsValidGroup(group, wwtGroups);
     if (group.Parent != null)
     {
         UpdateGroupStatus(group.Parent, wwtGroups);
     }
 }
        public void IsValidGroupNegativeTest()
        {
            // Use WWTMockRequest in WWTManager so that all calls to WWT API will succeed.
            Globals_Accessor.wwtManager    = new WWTManager(new WWTMockRequest());
            Globals_Accessor.TargetMachine = new TargetMachine(Constants.Localhost);
            Group group = new Group("Insat", GroupType.ReferenceFrame, new Group("Earth", GroupType.ReferenceFrame, null));
            ICollection <Group> wwtGroups = WWTManager_Accessor.GetAllWWTGroups(true);
            bool expected = false;
            bool actual;

            actual = WWTManager.IsValidGroup(group, wwtGroups);
            Assert.AreEqual(expected, actual);
        }