private static void ValidateSecureScoreControlItem(SecureScoreControlDefinitionItem item)
 {
     Assert.NotNull(item);
     Assert.NotNull(item.DisplayName);
     Assert.NotNull(item.Id);
     Assert.NotNull(item.Type);
     Assert.NotNull(item.AssessmentDefinitions);
     Assert.NotNull(item.MaxScore);
     Assert.NotNull(item.Name);
     Assert.NotNull(item.Source);
     Assert.Equal("Microsoft.Security/secureScoreControlDefinitions", item.Type);
     Assert.NotEmpty(item.AssessmentDefinitions);
 }
Exemple #2
0
 public static PSSecuritySecureScoreControlDefinition ConvertToPSType(this SecureScoreControlDefinitionItem value)
 {
     return(new PSSecuritySecureScoreControlDefinition
     {
         Id = value.Id,
         Name = value.Name,
         Type = value.Type,
         DisplayName = value.DisplayName,
         Description = value.Description,
         MaxScore = value.MaxScore.Value,
         AssessmentDefinitions = value.AssessmentDefinitions.Select(item => item.Id).ToArray(),
         Source = value.Source.SourceType
     });
 }