From ac48ceaab2f8d348a785492632917912d37284e7 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Tue, 24 Sep 2019 10:21:06 -0700 Subject: [PATCH] React to change in logging testing --- .../IIS/test/Common.FunctionalTests/FixtureLoggedTest.cs | 5 +++-- .../IIS.Shared.FunctionalTests/Properties/AssemblyInfo.cs | 1 + .../IISExpress.FunctionalTests/Properties/AssemblyInfo.cs | 1 + .../shared/test/TestApplicationErrorLoggerLoggedTest.cs | 6 +++--- .../Kestrel/test/BindTests/Properties/AssemblyInfo.cs | 1 + .../Kestrel/test/FunctionalTests/Properties/AssemblyInfo.cs | 1 + .../test/InMemory.FunctionalTests/Http2/Http2TestBase.cs | 4 ++-- .../InMemory.FunctionalTests/Properties/AssemblyInfo.cs | 1 + .../test/Interop.FunctionalTests/Properties/AssemblyInfo.cs | 1 + 9 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/FixtureLoggedTest.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/FixtureLoggedTest.cs index a8aaea4f2c..29af89da9b 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/FixtureLoggedTest.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/FixtureLoggedTest.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Reflection; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.Logging.Testing; using Xunit.Abstractions; @@ -16,9 +17,9 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests _fixture = fixture; } - public override void Initialize(MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - base.Initialize(methodInfo, testMethodArguments, testOutputHelper); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); _fixture.Attach(this); } diff --git a/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/Properties/AssemblyInfo.cs b/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/Properties/AssemblyInfo.cs index 863fe8564c..595dcdb5c9 100644 --- a/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/Properties/AssemblyInfo.cs +++ b/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/Properties/AssemblyInfo.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Server.IIS.FunctionalTests; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.Logging.Testing; using Xunit; diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/Properties/AssemblyInfo.cs b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/Properties/AssemblyInfo.cs index 863fe8564c..595dcdb5c9 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/Properties/AssemblyInfo.cs +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/Properties/AssemblyInfo.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Server.IIS.FunctionalTests; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.Logging.Testing; using Xunit; diff --git a/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.cs b/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.cs index c149111fdb..5d5831d942 100644 --- a/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.cs +++ b/src/Servers/Kestrel/shared/test/TestApplicationErrorLoggerLoggedTest.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.Reflection; @@ -11,9 +11,9 @@ namespace Microsoft.AspNetCore.Testing { public TestApplicationErrorLogger TestApplicationErrorLogger { get; private set; } - public override void Initialize(MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - base.Initialize(methodInfo, testMethodArguments, testOutputHelper); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); TestApplicationErrorLogger = new TestApplicationErrorLogger(); LoggerFactory.AddProvider(new KestrelTestLoggerProvider(TestApplicationErrorLogger)); diff --git a/src/Servers/Kestrel/test/BindTests/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/test/BindTests/Properties/AssemblyInfo.cs index 7cb6c7571b..5aa7f30840 100644 --- a/src/Servers/Kestrel/test/BindTests/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/test/BindTests/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ // 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; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; diff --git a/src/Servers/Kestrel/test/FunctionalTests/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/test/FunctionalTests/Properties/AssemblyInfo.cs index 5c26b3d74f..f950229354 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ // 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; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; #if MACOS diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs index 137ea743b7..5b875bffab 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs @@ -378,9 +378,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests }; } - public override void Initialize(MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) + public override void Initialize(TestContext context, MethodInfo methodInfo, object[] testMethodArguments, ITestOutputHelper testOutputHelper) { - base.Initialize(methodInfo, testMethodArguments, testOutputHelper); + base.Initialize(context, methodInfo, testMethodArguments, testOutputHelper); _serviceContext = new TestServiceContext(LoggerFactory, _mockKestrelTrace.Object) { diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs index 88b33bf6cc..d5d301aba5 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Properties/AssemblyInfo.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Runtime.CompilerServices; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing; diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/Properties/AssemblyInfo.cs b/src/Servers/Kestrel/test/Interop.FunctionalTests/Properties/AssemblyInfo.cs index 7cb6c7571b..5aa7f30840 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/Properties/AssemblyInfo.cs +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ // 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; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Testing;