Skip to content

Commit 9bbe918

Browse files
Updated tests to run generation tests on all platforms
1 parent edc2ac0 commit 9bbe918

12 files changed

+61
-55
lines changed

test/Client.Tests/ClientTests.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public ClientTests(ITestOutputHelper testOutput)
3838
/// <summary>
3939
/// Ensure that the language client can successfully request Hover information.
4040
/// </summary>
41-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully request hover info")]
41+
[Fact(DisplayName = "Language client can successfully request hover info")]
4242
public async Task Hover_Success()
4343
{
4444
const int line = 5;
@@ -111,7 +111,7 @@ public async Task Hover_Success()
111111
/// <summary>
112112
/// Ensure that the language client can successfully request Completions.
113113
/// </summary>
114-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully request completions")]
114+
[Fact(DisplayName = "Language client can successfully request completions")]
115115
public async Task Completions_Success()
116116
{
117117
const int line = 5;
@@ -215,7 +215,7 @@ public async Task Completions_Success()
215215
/// <summary>
216216
/// Ensure that the language client can successfully request SignatureHelp.
217217
/// </summary>
218-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully request signature help")]
218+
[Fact(DisplayName = "Language client can successfully request signature help")]
219219
public async Task SignatureHelp_Success()
220220
{
221221
const int line = 5;
@@ -308,7 +308,7 @@ public async Task SignatureHelp_Success()
308308
/// <summary>
309309
/// Ensure that the language client can successfully request Definition.
310310
/// </summary>
311-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully request definition")]
311+
[Fact(DisplayName = "Language client can successfully request definition")]
312312
public async Task Definition_Success()
313313
{
314314
const int line = 5;
@@ -384,7 +384,7 @@ public async Task Definition_Success()
384384
/// <summary>
385385
/// Ensure that the language client can successfully request DocumentHighlight.
386386
/// </summary>
387-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully request document highlights")]
387+
[Fact(DisplayName = "Language client can successfully request document highlights")]
388388
public async Task DocumentHighlights_Success()
389389
{
390390
const int line = 5;
@@ -449,7 +449,7 @@ public async Task DocumentHighlights_Success()
449449
/// <summary>
450450
/// Ensure that the language client can successfully request DocumentHighlight.
451451
/// </summary>
452-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully request document symbols")]
452+
[Fact(DisplayName = "Language client can successfully request document symbols")]
453453
public async Task DocumentSymbols_DocumentSymbol_Success()
454454
{
455455
const int line = 5;
@@ -534,7 +534,7 @@ public async Task DocumentSymbols_DocumentSymbol_Success()
534534
/// <summary>
535535
/// Ensure that the language client can successfully request FoldingRanges.
536536
/// </summary>
537-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully request document folding ranges")]
537+
[Fact(DisplayName = "Language client can successfully request document folding ranges")]
538538
public async Task FoldingRanges_Success()
539539
{
540540
var expectedDocumentPath = AbsoluteDocumentPath;
@@ -594,7 +594,7 @@ public async Task FoldingRanges_Success()
594594
/// <summary>
595595
/// Ensure that the language client can successfully receive Diagnostics from the server.
596596
/// </summary>
597-
[FactWithSkipOn(SkipOnPlatform.Windows, DisplayName = "Language client can successfully receive diagnostics")]
597+
[Fact(DisplayName = "Language client can successfully receive diagnostics")]
598598
public async Task Diagnostics_Success()
599599
{
600600
var documentPath = AbsoluteDocumentPath;

test/Dap.Tests/Integration/ProgressTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public ProgressTests(ITestOutputHelper outputHelper) : base(
2424
{
2525
}
2626

27-
[FactWithSkipOn(SkipOnPlatform.All)]
27+
[Fact]
2828
public async Task Should_Support_Progress_From_Sever_To_Client()
2929
{
3030
var (client, server) = await Initialize(ConfigureClient, ConfigureServer);
@@ -87,7 +87,7 @@ public async Task Should_Support_Progress_From_Sever_To_Client()
8787
results.Should().ContainInOrder("Begin", "Report 1", "Report 2", "Report 3", "Report 4", "End");
8888
}
8989

90-
[FactWithSkipOn(SkipOnPlatform.All)]
90+
[Fact]
9191
public async Task Should_Support_Cancelling_Progress_From_Server_To_Client_Request()
9292
{
9393
var (client, server) = await Initialize(ConfigureClient, ConfigureServer);

test/Generation.Tests/AutoImplementParamsGeneratorTests.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
using OmniSharp.Extensions.JsonRpc.Generators;
33
using OmniSharp.Extensions.JsonRpc.Generators.Cache;
44
using TestingUtils;
5+
using Xunit;
56

67
namespace Generation.Tests
78
{
89
public class AutoImplementParamsGeneratorTests
910
{
10-
[FactWithSkipOn(SkipOnPlatform.Windows)]
11+
[Fact]
1112
public async Task Auto_Magically_Implements_Properties()
1213
{
1314
var source = @"

test/Generation.Tests/EnumLikeStringGeneratorTests.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
using OmniSharp.Extensions.JsonRpc.Generators;
33
using OmniSharp.Extensions.JsonRpc.Generators.Cache;
44
using TestingUtils;
5+
using Xunit;
56

67
namespace Generation.Tests
78
{
89
public class EnumLikeStringGeneratorTests
910
{
10-
[FactWithSkipOn(SkipOnPlatform.Windows)]
11+
[Fact]
1112
public async Task Auto_Magically_Implements_IEnumLikeString()
1213
{
1314
var source = @"

test/Generation.Tests/GeneratedRegistrationOptionsTests.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
using System.Threading.Tasks;
22
using OmniSharp.Extensions.JsonRpc.Generators;
33
using TestingUtils;
4+
using Xunit;
45

56
namespace Generation.Tests
67
{
78
public class GeneratedRegistrationOptionsTests
89
{
9-
[FactWithSkipOn(SkipOnPlatform.Windows)]
10+
[Fact]
1011
public async Task Supports_Generating_Strongly_Typed_WorkDone_Registration_Options()
1112
{
1213
var source = @"
@@ -67,7 +68,7 @@ public bool WorkDoneProgress
6768
#nullable restore";
6869
await GenerationHelpers.AssertGeneratedAsExpected<RegistrationOptionsGenerator>(source, expected);
6970
}
70-
[FactWithSkipOn(SkipOnPlatform.Windows)]
71+
[Fact]
7172
public async Task Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface()
7273
{
7374
var source = @"
@@ -132,7 +133,7 @@ public bool WorkDoneProgress
132133
await GenerationHelpers.AssertGeneratedAsExpected<RegistrationOptionsGenerator>(source, expected);
133134
}
134135

135-
[FactWithSkipOn(SkipOnPlatform.Windows)]
136+
[Fact]
136137
public async Task Supports_Generating_Strongly_Typed_Registration_Options()
137138
{
138139
var source = @"
@@ -275,7 +276,7 @@ public bool WorkDoneProgress
275276
await GenerationHelpers.AssertGeneratedAsExpected<RegistrationOptionsGenerator>(source, expected);
276277
}
277278

278-
[FactWithSkipOn(SkipOnPlatform.Windows)]
279+
[Fact]
279280
public async Task Supports_Generating_Strongly_Typed_Registration_Options_With_Converters()
280281
{
281282
var source = @"

test/Generation.Tests/JsonRpcGenerationTests.cs

+14-14
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Generation.Tests
1212
{
1313
public class JsonRpcGenerationTests
1414
{
15-
[FactWithSkipOn(SkipOnPlatform.Windows)]
15+
[Fact]
1616
public async Task Supports_Generating_Notifications_And_Infers_Direction_ExitHandler()
1717
{
1818
var source = @"
@@ -74,7 +74,7 @@ public static partial class ExitExtensions
7474
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
7575
}
7676

77-
[FactWithSkipOn(SkipOnPlatform.Windows)]
77+
[Fact]
7878
public async Task Supports_Generating_Generic_Response_Types()
7979
{
8080
var source = @"
@@ -182,7 +182,7 @@ public static ILanguageServerRegistry OnExecuteCommand<T>(this ILanguageServerRe
182182
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
183183
}
184184

185-
[FactWithSkipOn(SkipOnPlatform.Windows)]
185+
[Fact]
186186
public async Task Should_Report_Diagnostic_If_Missing_Information()
187187
{
188188
var source = @"
@@ -212,7 +212,7 @@ public interface IExitHandler : IJsonRpcNotificationHandler<ExitParams>
212212
a.Should().Throw<EmptyException>("cache").WithMessage("*Could not infer the request router(s)*");
213213
}
214214

215-
[FactWithSkipOn(SkipOnPlatform.Windows)]
215+
[Fact]
216216
public async Task Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler()
217217
{
218218
var source = @"
@@ -266,7 +266,7 @@ public static partial class CapabilitiesExtensions
266266
}
267267

268268

269-
[FactWithSkipOn(SkipOnPlatform.Windows)]
269+
[Fact]
270270
public async Task Supports_Generating_Notifications_ExitHandler()
271271
{
272272
var source = @"
@@ -327,7 +327,7 @@ public static partial class ExitExtensions
327327
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
328328
}
329329

330-
[FactWithSkipOn(SkipOnPlatform.Windows)]
330+
[Fact]
331331
public async Task Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler()
332332
{
333333
var source = @"
@@ -417,7 +417,7 @@ public static ILanguageServerRegistry OnDidChangeTextDocument(this ILanguageServ
417417
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
418418
}
419419

420-
[FactWithSkipOn(SkipOnPlatform.Windows)]
420+
[Fact]
421421
public async Task Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler()
422422
{
423423
var source = @"
@@ -511,7 +511,7 @@ public static ILanguageServerRegistry ObserveFoldingRange(this ILanguageServerRe
511511
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
512512
}
513513

514-
[FactWithSkipOn(SkipOnPlatform.Windows)]
514+
[Fact]
515515
public async Task Supports_Generating_Requests_And_Infers_Direction()
516516
{
517517
var source = @"
@@ -600,7 +600,7 @@ public static ILanguageServerRegistry ObserveDefinition(this ILanguageServerRegi
600600
}
601601

602602

603-
[FactWithSkipOn(SkipOnPlatform.Windows)]
603+
[Fact]
604604
public async Task Supports_Generating_Requests()
605605
{
606606
var source = @"
@@ -688,7 +688,7 @@ public static ILanguageServerRegistry ObserveDefinition(this ILanguageServerRegi
688688
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
689689
}
690690

691-
[FactWithSkipOn(SkipOnPlatform.Windows)]
691+
[Fact]
692692
public async Task Supports_Custom_Method_Names()
693693
{
694694
var source = @"
@@ -751,7 +751,7 @@ public static partial class LanguageProtocolInitializeExtensions
751751
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
752752
}
753753

754-
[FactWithSkipOn(SkipOnPlatform.Windows)]
754+
[Fact]
755755
public async Task Supports_Allow_Derived_Requests()
756756
{
757757
var source = @"
@@ -833,7 +833,7 @@ public static IDebugAdapterServerRegistry OnAttachRequest<T>(this IDebugAdapterS
833833
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
834834
}
835835

836-
[FactWithSkipOn(SkipOnPlatform.Windows)]
836+
[Fact]
837837
public async Task Supports_Allow_Derived_Requests_Nullable()
838838
{
839839
var source = @"
@@ -997,7 +997,7 @@ public static IDebugAdapterServerRegistry OnAttachRequest<T>(this IDebugAdapterS
997997
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
998998
}
999999

1000-
[FactWithSkipOn(SkipOnPlatform.Windows)]
1000+
[Fact]
10011001
public async Task Supports_Allow_Generic_Types()
10021002
{
10031003
var source = @"
@@ -1079,7 +1079,7 @@ public static IDebugAdapterServerRegistry OnAttachRequest<T>(this IDebugAdapterS
10791079
await AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
10801080
}
10811081

1082-
[FactWithSkipOn(SkipOnPlatform.Windows)]
1082+
[Fact]
10831083
public async Task Supports_Params_Type_As_Source()
10841084
{
10851085
var source = @"

test/Generation.Tests/LspFeatureTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Generation.Tests
77
{
88
public class LspFeatureTests
99
{
10-
// [FactWithSkipOn(SkipOnPlatform.Windows, Skip = "for testing")]
10+
// [Fact(Skip = "for testing"]
1111
[Fact]
1212
public async Task Supports_Params_Type_As_Source()
1313
{
@@ -105,7 +105,7 @@ public static ILanguageServerRegistry ObserveWorkspaceSymbols(this ILanguageServ
105105
await GenerationHelpers.AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expected);
106106
}
107107

108-
[FactWithSkipOn(SkipOnPlatform.Windows)]
108+
[Fact]
109109
public async Task Supports_Generating_Custom_Language_Extensions()
110110
{
111111
var source = @"
@@ -373,7 +373,7 @@ public static ILanguageServerRegistry ObserveDiscoverUnitTests(this ILanguageSer
373373
await GenerationHelpers.AssertGeneratedAsExpected<GenerateHandlerMethodsGenerator>(source, expectedHandlers);
374374
}
375375

376-
[FactWithSkipOn(SkipOnPlatform.Windows)]
376+
[Fact]
377377
public async Task Supports_Generating_Void_Task_Return()
378378
{
379379
var source = @"

test/Generation.Tests/TypedCanBeResolvedTests.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
using System.Threading.Tasks;
22
using OmniSharp.Extensions.JsonRpc.Generators;
33
using TestingUtils;
4+
using Xunit;
45

56
namespace Generation.Tests
67
{
78
public class TypedCanBeResolvedTests
89
{
9-
[FactWithSkipOn(SkipOnPlatform.Windows)]
10+
[Fact]
1011
public async Task Supports_Generating_Strongly_Typed_ICanBeResolved_Data()
1112
{
1213
var source = @"
@@ -282,7 +283,7 @@ public CodeLensContainer(params CodeLens<T>[] items): base(items)
282283
await GenerationHelpers.AssertGeneratedAsExpected<StronglyTypedGenerator>(source, expected);
283284
}
284285

285-
[FactWithSkipOn(SkipOnPlatform.Windows)]
286+
[Fact]
286287
public async Task Supports_Generating_Strongly_Typed_Container()
287288
{
288289
var source = @"

0 commit comments

Comments
 (0)