diff --git a/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundDispatcherTestBase.cs b/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundDispatcherTestBase.cs index 226b0b2211..0bcbb7b697 100644 --- a/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundDispatcherTestBase.cs +++ b/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundDispatcherTestBase.cs @@ -40,12 +40,12 @@ namespace Xunit protected override void QueueTask(Task task) { - throw new InvalidOperationException("Use [ForegroundFactAttribute]"); + throw new InvalidOperationException($"Use [{nameof(ForegroundFactAttribute)}]"); } protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued) { - throw new InvalidOperationException("Use [ForegroundFactAttribute]"); + throw new InvalidOperationException($"Use [{nameof(ForegroundFactAttribute)}]"); } } } diff --git a/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundFactAttribute.cs b/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundFactAttribute.cs index e111c5b330..b692a43a8f 100644 --- a/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundFactAttribute.cs +++ b/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Xunit/ForegroundFactAttribute.cs @@ -2,14 +2,13 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Xunit; using Xunit.Sdk; -namespace Microsoft.VisualStudio.LanguageServices.Razor.Test +namespace Xunit { // Similar to WpfFactAttribute https://github.com/xunit/samples.xunit/blob/969d9f7e887836f01a6c525324bf3db55658c28f/STAExamples/WpfFactAttribute.cs [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] - [XunitTestCaseDiscoverer(nameof(ForegroundFactAttribute), nameof(Microsoft.VisualStudio.LanguageServices.Razor))] + [XunitTestCaseDiscoverer("Xunit.ForegroundFactAttribute", "Microsoft.VisualStudio.LanguageServices.Razor")] internal class ForegroundFactAttribute : FactAttribute { }