< Summary - CoreWCF Coverage — PR #1766

Information
Class: Helpers.XunitLoggerProvider
Assembly: UnitTests.Common
File(s): /home/runner/work/CoreWCF/CoreWCF/src/Common/UnitTests.Common/Helpers/XunitLoggerProvider.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 26
Line coverage: 0%
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
.ctor(...)100%110%
CreateLogger(...)100%110%
Dispose()100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/Common/UnitTests.Common/Helpers/XunitLoggerProvider.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 Microsoft.Extensions.Logging;
 5using Xunit;
 6
 7namespace Helpers
 8{
 9    public class XunitLoggerProvider : ILoggerProvider
 10    {
 11        private readonly ITestOutputHelper _testOutputHelper;
 12        private readonly string _callerMethodName;
 13
 014        public XunitLoggerProvider(ITestOutputHelper testOutputHelper, string callerMethodName)
 15        {
 016            _testOutputHelper = testOutputHelper;
 017            _callerMethodName = callerMethodName;
 018        }
 19
 20        public ILogger CreateLogger(string categoryName)
 021            => new XunitLogger(_testOutputHelper, categoryName, _callerMethodName);
 22
 23        public void Dispose()
 024        { }
 25    }
 26}