public ActiveDirectoryGroupDTO GetActiveDirectoryGroup(ActiveDirectoryGroupFilterDTO filter) { var dto = default(ActiveDirectoryGroupDTO); try { //Casts from AD base group to domain AD Group object var adGroup = _adRepo.GetGroup(filter.GroupIdentity, true).Map <BaseActiveDirectoryGroup, ActiveDirectoryGroup>(); adGroup.Validate(); if (adGroup.Validation.HasErrors) { throw new ServiceException(adGroup.Validation.Results); } dto = adGroup.Map <ActiveDirectoryGroup, ActiveDirectoryGroupDTO>(); } catch (Exception ex) { LogHelper.ExceptionAndThrow(ex); } return(dto); }
public void GetGroup() { var adGroup = adRepository.GetGroup("SOA DSI Technical Team DL", true); Assert.IsNotNull(adGroup); Assert.AreEqual("SOA DSI Technical Team DL", adGroup.NameOrDescription); }