< Summary

Class:Microsoft.Azure.Batch.Conventions.Files.Utilities.Validate
Assembly:Microsoft.Azure.Batch.Conventions.Files
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch.Conventions.Files\src\Utilities\Validate.cs
Covered lines:5
Uncovered lines:0
Coverable lines:5
Total lines:37
Line coverage:100% (5 of 5)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
IsNotNullOrEmpty(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch.Conventions.Files\src\Utilities\Validate.cs

#LineLine coverage
 1// Copyright (c) Microsoft and contributors.  All rights reserved.
 2//
 3// Licensed under the Apache License, Version 2.0 (the "License");
 4// you may not use this file except in compliance with the License.
 5// You may obtain a copy of the License at
 6// http://www.apache.org/licenses/LICENSE-2.0
 7//
 8// Unless required by applicable law or agreed to in writing, software
 9// distributed under the License is distributed on an "AS IS" BASIS,
 10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 11//
 12// See the License for the specific language governing permissions and
 13// limitations under the License.
 14
 15using System;
 16using System.Collections.Generic;
 17using System.Linq;
 18using System.Text;
 19using System.Threading.Tasks;
 20
 21namespace Microsoft.Azure.Batch.Conventions.Files.Utilities
 22{
 23    internal static class Validate
 24    {
 25        internal static void IsNotNullOrEmpty(string value, string paramName)
 26        {
 13127            if (value == null)
 28            {
 1529                throw new ArgumentNullException(paramName);
 30            }
 11631            if (value.Length == 0)
 32            {
 1533                throw new ArgumentException($"{paramName} must not be empty", paramName);
 34            }
 10135        }
 36    }
 37}

Methods/Properties

IsNotNullOrEmpty(...)