< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.WSMessageEncodingHelper
Assembly: CoreWCF.Http
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/WSMessageEncoding.cs
Line coverage
50%
Covered lines: 3
Uncovered lines: 3
Coverable lines: 6
Total lines: 31
Line coverage: 50%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
IsDefined(...)0%220%
SyncUpEncodingBindingElementProperties(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/WSMessageEncoding.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 CoreWCF.Channels;
 5
 6namespace CoreWCF
 7{
 8    public enum WSMessageEncoding
 9    {
 10        Text = 0,
 11        Mtom,
 12    }
 13
 14    internal static class WSMessageEncodingHelper
 15    {
 16        internal static bool IsDefined(WSMessageEncoding value)
 17        {
 018            return
 019                value == WSMessageEncoding.Text
 020                || value == WSMessageEncoding.Mtom;
 21        }
 22
 23        internal static void SyncUpEncodingBindingElementProperties(TextMessageEncodingBindingElement textEncoding, Mtom
 24        {
 25            // textEncoding provides the backing store for ReaderQuotas and WriteEncoding,
 26            // we must ensure same values propogate to mtomEncoding
 385427            textEncoding.ReaderQuotas.CopyTo(mtomEncoding.ReaderQuotas);
 385428            mtomEncoding.WriteEncoding = textEncoding.WriteEncoding;
 385429        }
 30    }
 31}