< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.ImageUrl
Assembly:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Prediction\src\Generated\Models\ImageUrl.cs
Covered lines:6
Uncovered lines:3
Coverable lines:9
Total lines:65
Line coverage:66.6% (6 of 9)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Prediction\src\Generated\Models\ImageUrl.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.Vision.CustomVision.Prediction.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Linq;
 16
 17    /// <summary>
 18    /// Image url.
 19    /// </summary>
 20    public partial class ImageUrl
 21    {
 22        /// <summary>
 23        /// Initializes a new instance of the ImageUrl class.
 24        /// </summary>
 025        public ImageUrl()
 26        {
 27            CustomInit();
 028        }
 29
 30        /// <summary>
 31        /// Initializes a new instance of the ImageUrl class.
 32        /// </summary>
 33        /// <param name="url">Url of the image.</param>
 834        public ImageUrl(string url)
 35        {
 836            Url = url;
 37            CustomInit();
 838        }
 39
 40        /// <summary>
 41        /// An initialization method that performs custom operations like setting defaults
 42        /// </summary>
 43        partial void CustomInit();
 44
 45        /// <summary>
 46        /// Gets or sets url of the image.
 47        /// </summary>
 48        [JsonProperty(PropertyName = "url")]
 2449        public string Url { get; set; }
 50
 51        /// <summary>
 52        /// Validate the object.
 53        /// </summary>
 54        /// <exception cref="ValidationException">
 55        /// Thrown if validation fails
 56        /// </exception>
 57        public virtual void Validate()
 58        {
 859            if (Url == null)
 60            {
 061                throw new ValidationException(ValidationRules.CannotBeNull, "Url");
 62            }
 863        }
 64    }
 65}

Methods/Properties

.ctor()
.ctor(...)
get_Url()
Validate()