< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.MsmqQueueNameConverter
Assembly: CoreWCF.MSMQ
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.MSMQ/src/CoreWCF/Channels/MsmqQueueNameConverter.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 24
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
GetEndpointUrl(...)100%11100%
GetMsmqFormatQueueName(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.MSMQ/src/CoreWCF/Channels/MsmqQueueNameConverter.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System;
 5
 6namespace CoreWCF.Channels
 7{
 8    public class MsmqQueueNameConverter
 9    {
 10        public static string GetEndpointUrl(string queueName)
 11{
 112            return $"net.msmq://localhost/private/{queueName}";
 13        }
 14
 15        public static string GetMsmqFormatQueueName(Uri endpoint)
 16        {
 117            string uriLocalPath = endpoint.LocalPath;
 118            int startIndex = uriLocalPath.IndexOf("private", StringComparison.InvariantCultureIgnoreCase) + 8;
 119            int length = uriLocalPath.Length - uriLocalPath.LastIndexOf("/", StringComparison.InvariantCultureIgnoreCase
 120            string queueName = uriLocalPath.Substring(startIndex, length);
 121            return $".\\Private$\\{queueName}";
 22        }
 23    }
 24}