< Summary

Class:Azure.Data.AppConfiguration.ConfigurationModelFactory
Assembly:Azure.Data.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.Data.AppConfiguration\src\ConfigurationModelFactory.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:41
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ConfigurationSetting(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.Data.AppConfiguration\src\ConfigurationModelFactory.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5
 6namespace Azure.Data.AppConfiguration
 7{
 8    /// <summary>
 9    /// Configuration Setting model factory that enables mocking for the App Configuration client library.
 10    /// </summary>
 11    public static class ConfigurationModelFactory
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="ConfigurationSetting"/> for mocking purposes.
 15        /// </summary>
 16        /// <param name="key">The primary identifier of a configuration setting.</param>
 17        /// <param name="value">The configuration setting's value.</param>
 18        /// <param name="label">A label used to group configuration settings.</param>
 19        /// <param name="contentType">The content type of the configuration setting's value.</param>
 20        /// <param name="eTag">An ETag indicating the version of a configuration setting within a configuration store.</
 21        /// <param name="lastModified">The last time a modifying operation was performed on the given configuration sett
 22        /// <param name="isReadOnly">A value indicating whether the configuration setting is read only.</param>
 23        public static ConfigurationSetting ConfigurationSetting(
 24            string key,
 25            string value,
 26            string label = null,
 27            string contentType = null,
 28            ETag eTag = default,
 29            DateTimeOffset? lastModified = null,
 30            bool? isReadOnly = null)
 31        {
 032            return new ConfigurationSetting(key, value, label)
 033            {
 034                ContentType = contentType,
 035                ETag = eTag,
 036                LastModified = lastModified,
 037                IsReadOnly = isReadOnly
 038            };
 39        }
 40    }
 41}

Methods/Properties

ConfigurationSetting(...)