private BaseSecurityAlertPolicyProperties PopulatePolicyProperties(BaseThreatDetectionPolicyModel model, BaseSecurityAlertPolicyProperties properties)
 {
     properties.State = model.ThreatDetectionState.ToString();
     properties.EmailAddresses = model.NotificationRecipientsEmails ?? "";
     properties.EmailAccountAdmins = model.EmailAdmins ?
         ThreatDetectionStateType.Enabled.ToString() :
         ThreatDetectionStateType.Disabled.ToString();
     properties.DisabledAlerts = ExtractExcludedDetectionType(model);
     return properties;
 }
 /// <summary>
 /// Changes the database security alert policy with new values
 /// </summary>
 private static void ChangeSecurityAlertPolicy(BaseSecurityAlertPolicyProperties properties)
 {
     properties.State = "Disabled";
     properties.DisabledAlerts = "DisableAlert1";
     properties.EmailAddresses = "[email protected];[email protected]";
     properties.EmailAccountAdmins = "Disabled";
 }
 /// <summary>
 /// Transforms the given database policy object to its cmdlet model representation
 /// </summary>
 private BaseThreatDetectionPolicyModel ModelizeThreatDetectionPolicy(BaseSecurityAlertPolicyProperties threatDetectionProperties, BaseThreatDetectionPolicyModel model)
 {  
     model.ThreatDetectionState = ModelizeThreatDetectionState(threatDetectionProperties.State);
     model.NotificationRecipientsEmails = threatDetectionProperties.EmailAddresses;
     model.EmailAdmins = ModelizeThreatDetectionEmailAdmins(threatDetectionProperties.EmailAccountAdmins);
     ModelizeDisabledAlerts(model, threatDetectionProperties.DisabledAlerts);
     return model;
 }
 /// <summary>
 /// Verify that the received properties match their expected values
 /// </summary>
 /// <param name="expected">The expected value of the properties object</param>
 /// <param name="actual">The properties object that needs to be checked</param>
 private static void VerifySecurityAlertPolicyInformation(BaseSecurityAlertPolicyProperties expected, BaseSecurityAlertPolicyProperties actual)
 {
     Assert.Equal(expected.State, actual.State);
     Assert.Equal(expected.DisabledAlerts, actual.DisabledAlerts);
     Assert.Equal(expected.EmailAddresses, actual.EmailAddresses);
     Assert.Equal(expected.EmailAccountAdmins, actual.EmailAccountAdmins);
 }