/// <summary> /// Initializes a new instance of the <see cref="PSLogProfile"/> class. /// </summary> public PSLogProfile(string id, string name, LogProfile logProfile) { this.Id = id; this.Name = name; this.Categories = logProfile.Categories.Select(x => x).ToList(); this.Locations = logProfile.Locations.Select(x => x).ToList(); this.RetentionPolicy = new RetentionPolicy() { Days = logProfile.RetentionPolicy.Days, Enabled = logProfile.RetentionPolicy.Enabled }; this.ServiceBusRuleId = logProfile.ServiceBusRuleId; this.StorageAccountId = logProfile.StorageAccountId; }
private static void AreEqual(LogProfile exp, LogProfile act) { if (exp != null) { CompareListString(exp.Categories, act.Categories); CompareListString(exp.Locations, act.Locations); Assert.Equal(exp.RetentionPolicy.Enabled, act.RetentionPolicy.Enabled); Assert.Equal(exp.RetentionPolicy.Days, act.RetentionPolicy.Days); Assert.Equal(exp.ServiceBusRuleId, act.ServiceBusRuleId); Assert.Equal(exp.StorageAccountId, act.StorageAccountId); } }