< Summary

Class:Microsoft.Azure.Search.Models.Analyzer
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\Analyzer.cs
Covered lines:8
Uncovered lines:1
Coverable lines:9
Total lines:70
Line coverage:88.8% (8 of 9)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\Analyzer.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.Search.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Linq;
 16
 17    /// <summary>
 18    /// Abstract base class for analyzers.
 19    /// </summary>
 20    public partial class Analyzer
 21    {
 22        /// <summary>
 23        /// Initializes a new instance of the Analyzer class.
 24        /// </summary>
 7225        public Analyzer()
 26        {
 27            CustomInit();
 7228        }
 29
 30        /// <summary>
 31        /// Initializes a new instance of the Analyzer class.
 32        /// </summary>
 33        /// <param name="name">The name of the analyzer. It must only contain
 34        /// letters, digits, spaces, dashes or underscores, can only start and
 35        /// end with alphanumeric characters, and is limited to 128
 36        /// characters.</param>
 7237        public Analyzer(string name)
 38        {
 7239            Name = name;
 40            CustomInit();
 7241        }
 42
 43        /// <summary>
 44        /// An initialization method that performs custom operations like setting defaults
 45        /// </summary>
 46        partial void CustomInit();
 47
 48        /// <summary>
 49        /// Gets or sets the name of the analyzer. It must only contain
 50        /// letters, digits, spaces, dashes or underscores, can only start and
 51        /// end with alphanumeric characters, and is limited to 128 characters.
 52        /// </summary>
 53        [JsonProperty(PropertyName = "name")]
 42054        public string Name { get; set; }
 55
 56        /// <summary>
 57        /// Validate the object.
 58        /// </summary>
 59        /// <exception cref="ValidationException">
 60        /// Thrown if validation fails
 61        /// </exception>
 62        public virtual void Validate()
 63        {
 7464            if (Name == null)
 65            {
 066                throw new ValidationException(ValidationRules.CannotBeNull, "Name");
 67            }
 7468        }
 69    }
 70}