< Summary

Class:Microsoft.Azure.CognitiveServices.Search.AutoSuggest.Models.SearchResultsAnswer
Assembly:Microsoft.Azure.CognitiveServices.Search.BingAutoSuggest
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingAutoSuggest\src\Generated\AutoSuggest\Models\SearchResultsAnswer.cs
Covered lines:3
Uncovered lines:6
Coverable lines:9
Total lines:65
Line coverage:33.3% (3 of 9)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_QueryContext()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingAutoSuggest\src\Generated\AutoSuggest\Models\SearchResultsAnswer.cs

#LineLine coverage
 1// <auto-generated>
 2// Code generated by Microsoft (R) AutoRest Code Generator.
 3// Changes may cause incorrect behavior and will be lost if the code is
 4// regenerated.
 5// </auto-generated>
 6
 7namespace Microsoft.Azure.CognitiveServices.Search.AutoSuggest.Models
 8{
 9    using Newtonsoft.Json;
 10    using System.Collections;
 11    using System.Collections.Generic;
 12    using System.Linq;
 13
 14    /// <summary>
 15    /// Defines a search result answer.
 16    /// </summary>
 17    public partial class SearchResultsAnswer : Answer
 18    {
 19        /// <summary>
 20        /// Initializes a new instance of the SearchResultsAnswer class.
 21        /// </summary>
 222        public SearchResultsAnswer()
 23        {
 24            CustomInit();
 225        }
 26
 27        /// <summary>
 28        /// Initializes a new instance of the SearchResultsAnswer class.
 29        /// </summary>
 30        /// <param name="id">A String identifier.</param>
 31        /// <param name="readLink">The URL that returns this resource.</param>
 32        /// <param name="webSearchUrl">The URL To Bing's search result for this
 33        /// item.</param>
 34        public SearchResultsAnswer(string id = default(string), string readLink = default(string), string webSearchUrl =
 035            : base(id, readLink, webSearchUrl, potentialAction, immediateAction, preferredClickthroughUrl, adaptiveCard)
 36        {
 037            QueryContext = queryContext;
 38            CustomInit();
 039        }
 40
 41        /// <summary>
 42        /// An initialization method that performs custom operations like setting defaults
 43        /// </summary>
 44        partial void CustomInit();
 45
 46        /// <summary>
 47        /// </summary>
 48        [JsonProperty(PropertyName = "queryContext")]
 449        public QueryContext QueryContext { get; private set; }
 50
 51        /// <summary>
 52        /// Validate the object.
 53        /// </summary>
 54        /// <exception cref="Rest.ValidationException">
 55        /// Thrown if validation fails
 56        /// </exception>
 57        public virtual void Validate()
 58        {
 059            if (QueryContext != null)
 60            {
 061                QueryContext.Validate();
 62            }
 063        }
 64    }
 65}