< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Models.RequestList
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Runtime\src\Generated\Models\RequestList.cs
Covered lines:7
Uncovered lines:6
Coverable lines:13
Total lines:84
Line coverage:53.8% (7 of 13)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Name()-100%100%
get_CanonicalForm()-100%100%
get_Synonyms()-100%100%
Validate()-66.67%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Runtime\src\Generated\Models\RequestList.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 a sub-list to append to an existing list entity.
 21    /// </summary>
 22    public partial class RequestList
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the RequestList class.
 26        /// </summary>
 427        public RequestList()
 28        {
 29            CustomInit();
 430        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the RequestList class.
 34        /// </summary>
 35        /// <param name="canonicalForm">The canonical form of the
 36        /// sub-list.</param>
 37        /// <param name="name">The name of the sub-list.</param>
 38        /// <param name="synonyms">The synonyms of the canonical form.</param>
 039        public RequestList(string canonicalForm, string name = default(string), IList<string> synonyms = default(IList<s
 40        {
 041            Name = name;
 042            CanonicalForm = canonicalForm;
 043            Synonyms = synonyms;
 44            CustomInit();
 045        }
 46
 47        /// <summary>
 48        /// An initialization method that performs custom operations like setting defaults
 49        /// </summary>
 50        partial void CustomInit();
 51
 52        /// <summary>
 53        /// Gets or sets the name of the sub-list.
 54        /// </summary>
 55        [JsonProperty(PropertyName = "name")]
 856        public string Name { get; set; }
 57
 58        /// <summary>
 59        /// Gets or sets the canonical form of the sub-list.
 60        /// </summary>
 61        [JsonProperty(PropertyName = "canonicalForm")]
 1262        public string CanonicalForm { get; set; }
 63
 64        /// <summary>
 65        /// Gets or sets the synonyms of the canonical form.
 66        /// </summary>
 67        [JsonProperty(PropertyName = "synonyms")]
 868        public IList<string> Synonyms { get; set; }
 69
 70        /// <summary>
 71        /// Validate the object.
 72        /// </summary>
 73        /// <exception cref="ValidationException">
 74        /// Thrown if validation fails
 75        /// </exception>
 76        public virtual void Validate()
 77        {
 478            if (CanonicalForm == null)
 79            {
 080                throw new ValidationException(ValidationRules.CannotBeNull, "CanonicalForm");
 81            }
 482        }
 83    }
 84}