From c4c2df54eb47ceb70f63469c83716eff21df511e Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Tue, 29 Jan 2019 13:26:53 -0800 Subject: [PATCH] Use Arcade (#586) Use arcade --- .../Microsoft.Extensions.Logging.AzureAppServices.csproj | 5 +++++ .../Logging.AzureAppServices/src/Properties/AssemblyInfo.cs | 2 -- .../src/Microsoft.Extensions.Logging.Testing.csproj | 5 +++++ src/Logging/Logging.Testing/src/Properties/AssemblyInfo.cs | 6 ------ .../src/Xunit/LoggedConditionalFactDiscoverer.cs | 4 ++-- .../src/Xunit/LoggedConditionalTheoryDiscoverer.cs | 4 ++-- .../Logging.Testing/src/Xunit/LoggedFactDiscoverer.cs | 4 ++-- src/Logging/Logging.Testing/src/Xunit/LoggedTestCase.cs | 5 +++-- .../src/Xunit/LoggedTestFrameworkDiscoverer.cs | 6 +++--- .../Logging.Testing/src/Xunit/LoggedTheoryDiscoverer.cs | 6 +++--- .../Logging.Testing/src/Xunit/LoggedTheoryTestCase.cs | 5 +++-- .../test/Properties/{AssemlyInfo.cs => AssemblyInfo.cs} | 2 +- 12 files changed, 29 insertions(+), 25 deletions(-) delete mode 100644 src/Logging/Logging.Testing/src/Properties/AssemblyInfo.cs rename src/Logging/Logging.Testing/test/Properties/{AssemlyInfo.cs => AssemblyInfo.cs} (67%) diff --git a/src/Logging/Logging.AzureAppServices/src/Microsoft.Extensions.Logging.AzureAppServices.csproj b/src/Logging/Logging.AzureAppServices/src/Microsoft.Extensions.Logging.AzureAppServices.csproj index d6eb186122..4eace047d4 100644 --- a/src/Logging/Logging.AzureAppServices/src/Microsoft.Extensions.Logging.AzureAppServices.csproj +++ b/src/Logging/Logging.AzureAppServices/src/Microsoft.Extensions.Logging.AzureAppServices.csproj @@ -4,8 +4,13 @@ Logger implementation to support Azure App Services 'Diagnostics logs' and 'Log stream' features. netstandard2.0 $(NoWarn);CS1591 + true + + + + diff --git a/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs b/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs index 83f3ffe055..d77af5dc95 100644 --- a/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs +++ b/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.Logging.AzureAppServices.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/Logging/Logging.Testing/src/Microsoft.Extensions.Logging.Testing.csproj b/src/Logging/Logging.Testing/src/Microsoft.Extensions.Logging.Testing.csproj index 22a1db0243..84fbab2966 100644 --- a/src/Logging/Logging.Testing/src/Microsoft.Extensions.Logging.Testing.csproj +++ b/src/Logging/Logging.Testing/src/Microsoft.Extensions.Logging.Testing.csproj @@ -6,8 +6,13 @@ $(NoWarn);CS1591 $(PackageTags);testing false + true + + + + diff --git a/src/Logging/Logging.Testing/src/Properties/AssemblyInfo.cs b/src/Logging/Logging.Testing/src/Properties/AssemblyInfo.cs deleted file mode 100644 index a5cc6c1da7..0000000000 --- a/src/Logging/Logging.Testing/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.Extensions.Logging.Testing.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalFactDiscoverer.cs b/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalFactDiscoverer.cs index ebb9ecf92e..4ac4c6fe9c 100644 --- a/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalFactDiscoverer.cs +++ b/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalFactDiscoverer.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Testing.xunit; @@ -20,7 +20,7 @@ namespace Microsoft.Extensions.Logging.Testing { var skipReason = testMethod.EvaluateSkipConditions(); return skipReason != null - ? new SkippedTestCase(skipReason, _diagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod) + ? new SkippedTestCase(skipReason, _diagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod) : base.CreateTestCase(discoveryOptions, testMethod, factAttribute); } diff --git a/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalTheoryDiscoverer.cs b/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalTheoryDiscoverer.cs index d239b1147c..773ef71541 100644 --- a/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalTheoryDiscoverer.cs +++ b/src/Logging/Logging.Testing/src/Xunit/LoggedConditionalTheoryDiscoverer.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; @@ -22,7 +22,7 @@ namespace Microsoft.Extensions.Logging.Testing { var skipReason = testMethod.EvaluateSkipConditions(); return skipReason != null - ? new[] { new SkippedTestCase(skipReason, DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod) } + ? new[] { new SkippedTestCase(skipReason, DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod) } : base.CreateTestCasesForTheory(discoveryOptions, testMethod, theoryAttribute); } diff --git a/src/Logging/Logging.Testing/src/Xunit/LoggedFactDiscoverer.cs b/src/Logging/Logging.Testing/src/Xunit/LoggedFactDiscoverer.cs index c52d99c822..e2268d96cb 100644 --- a/src/Logging/Logging.Testing/src/Xunit/LoggedFactDiscoverer.cs +++ b/src/Logging/Logging.Testing/src/Xunit/LoggedFactDiscoverer.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Xunit.Abstractions; @@ -13,6 +13,6 @@ namespace Microsoft.Extensions.Logging.Testing } protected override IXunitTestCase CreateTestCase(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute) - => new LoggedTestCase(DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod); + => new LoggedTestCase(DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod); } } diff --git a/src/Logging/Logging.Testing/src/Xunit/LoggedTestCase.cs b/src/Logging/Logging.Testing/src/Xunit/LoggedTestCase.cs index b8d3684c18..c43180df89 100644 --- a/src/Logging/Logging.Testing/src/Xunit/LoggedTestCase.cs +++ b/src/Logging/Logging.Testing/src/Xunit/LoggedTestCase.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -19,9 +19,10 @@ namespace Microsoft.Extensions.Logging.Testing public LoggedTestCase( IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, + TestMethodDisplayOptions defaultMethodDisplayOptions, ITestMethod testMethod, object[] testMethodArguments = null) - : base(diagnosticMessageSink, defaultMethodDisplay, testMethod, testMethodArguments) + : base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod, testMethodArguments) { } diff --git a/src/Logging/Logging.Testing/src/Xunit/LoggedTestFrameworkDiscoverer.cs b/src/Logging/Logging.Testing/src/Xunit/LoggedTestFrameworkDiscoverer.cs index 4b1668ce95..9905404ed9 100644 --- a/src/Logging/Logging.Testing/src/Xunit/LoggedTestFrameworkDiscoverer.cs +++ b/src/Logging/Logging.Testing/src/Xunit/LoggedTestFrameworkDiscoverer.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -43,7 +43,7 @@ namespace Microsoft.Extensions.Logging.Testing if (factAttributes.Count() > 1) { var message = $"Test method '{testMethod.TestClass.Class.Name}.{testMethod.Method.Name}' has multiple [Fact]-derived attributes"; - var testCase = new ExecutionErrorTestCase(DiagnosticMessageSink, TestMethodDisplay.ClassAndMethod, testMethod, message); + var testCase = new ExecutionErrorTestCase(DiagnosticMessageSink, TestMethodDisplay.ClassAndMethod, TestMethodDisplayOptions.None, testMethod, message); return ReportDiscoveredTestCase(testCase, includeSourceInformation, messageBus); } @@ -77,4 +77,4 @@ namespace Microsoft.Extensions.Logging.Testing } } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryDiscoverer.cs b/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryDiscoverer.cs index 535099c690..9d5402a09b 100644 --- a/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryDiscoverer.cs +++ b/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryDiscoverer.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; @@ -18,12 +18,12 @@ namespace Microsoft.Extensions.Logging.Testing ITestMethod testMethod, IAttributeInfo theoryAttribute, object[] dataRow) - => new[] { new LoggedTestCase(DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod, dataRow) }; + => new[] { new LoggedTestCase(DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod, dataRow) }; protected override IEnumerable CreateTestCasesForTheory( ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo theoryAttribute) - => new[] { new LoggedTheoryTestCase(DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod) }; + => new[] { new LoggedTheoryTestCase(DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod) }; } } diff --git a/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryTestCase.cs b/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryTestCase.cs index db78f093c2..fa3e3a050d 100644 --- a/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryTestCase.cs +++ b/src/Logging/Logging.Testing/src/Xunit/LoggedTheoryTestCase.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -19,8 +19,9 @@ namespace Microsoft.Extensions.Logging.Testing public LoggedTheoryTestCase( IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, + TestMethodDisplayOptions defaultMethodDisplayOptions, ITestMethod testMethod) - : base(diagnosticMessageSink, defaultMethodDisplay, testMethod) + : base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod) { } diff --git a/src/Logging/Logging.Testing/test/Properties/AssemlyInfo.cs b/src/Logging/Logging.Testing/test/Properties/AssemblyInfo.cs similarity index 67% rename from src/Logging/Logging.Testing/test/Properties/AssemlyInfo.cs rename to src/Logging/Logging.Testing/test/Properties/AssemblyInfo.cs index 63c2b71d23..82616e2737 100644 --- a/src/Logging/Logging.Testing/test/Properties/AssemlyInfo.cs +++ b/src/Logging/Logging.Testing/test/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; [assembly: LogLevel(LogLevel.Trace)]