public MabContainer(ProtectionContainerResource protectionContainer) : base(protectionContainer) { MabProtectionContainer mabProtectionContainer = (MabProtectionContainer)protectionContainer.Properties; FriendlyName = mabProtectionContainer.FriendlyName; Status = EnumUtils.GetEnum <ContainerRegistrationStatus>(mabProtectionContainer.RegistrationStatus); }
public void ListContainersTest() { using (UndoContext context = UndoContext.Current) { context.Start(); string resourceNamespace = ConfigurationManager.AppSettings["ResourceNamespace"]; var client = GetServiceClient <RecoveryServicesBackupManagementClient>(resourceNamespace); ProtectionContainerListQueryParams queryParams = new ProtectionContainerListQueryParams(); queryParams.BackupManagementType = BackupManagementType.MAB.ToString(); ContainerTestHelper containerTestHelper = new ContainerTestHelper(client); ProtectionContainerListResponse response = containerTestHelper.ListMABContainers(queryParams); string containerUniqueName = CommonTestHelper.GetSetting(TestConstants.RsVaultMabContainerUniqueName); MabProtectionContainer container = response.ItemList.ProtectionContainers[0].Properties as MabProtectionContainer; Assert.NotNull(container); Assert.Equal(containerUniqueName, container.FriendlyName); } }