< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Models.DynamicList
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Runtime\src\Generated\Models\DynamicList.cs
Covered lines:11
Uncovered lines:6
Coverable lines:17
Total lines:91
Line coverage:64.7% (11 of 17)
Covered branches:8
Total branches:10
Branch coverage:80% (8 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_ListEntityName()-100%100%
get_RequestLists()-100%100%
Validate()-77.78%80%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Runtime\src\Generated\Models\DynamicList.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Collections;
 16    using System.Collections.Generic;
 17    using System.Linq;
 18
 19    /// <summary>
 20    /// Defines an extension for a list entity.
 21    /// </summary>
 22    public partial class DynamicList
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the DynamicList class.
 26        /// </summary>
 427        public DynamicList()
 28        {
 29            CustomInit();
 430        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the DynamicList class.
 34        /// </summary>
 35        /// <param name="listEntityName">The name of the list entity to
 36        /// extend.</param>
 37        /// <param name="requestLists">The lists to append on the extended list
 38        /// entity.</param>
 039        public DynamicList(string listEntityName, IList<RequestList> requestLists)
 40        {
 041            ListEntityName = listEntityName;
 042            RequestLists = requestLists;
 43            CustomInit();
 044        }
 45
 46        /// <summary>
 47        /// An initialization method that performs custom operations like setting defaults
 48        /// </summary>
 49        partial void CustomInit();
 50
 51        /// <summary>
 52        /// Gets or sets the name of the list entity to extend.
 53        /// </summary>
 54        [JsonProperty(PropertyName = "listEntityName")]
 1255        public string ListEntityName { get; set; }
 56
 57        /// <summary>
 58        /// Gets or sets the lists to append on the extended list entity.
 59        /// </summary>
 60        [JsonProperty(PropertyName = "requestLists")]
 2061        public IList<RequestList> RequestLists { get; set; }
 62
 63        /// <summary>
 64        /// Validate the object.
 65        /// </summary>
 66        /// <exception cref="ValidationException">
 67        /// Thrown if validation fails
 68        /// </exception>
 69        public virtual void Validate()
 70        {
 471            if (ListEntityName == null)
 72            {
 073                throw new ValidationException(ValidationRules.CannotBeNull, "ListEntityName");
 74            }
 475            if (RequestLists == null)
 76            {
 077                throw new ValidationException(ValidationRules.CannotBeNull, "RequestLists");
 78            }
 479            if (RequestLists != null)
 80            {
 1681                foreach (var element in RequestLists)
 82                {
 483                    if (element != null)
 84                    {
 485                        element.Validate();
 86                    }
 87                }
 88            }
 489        }
 90    }
 91}