13
13
14
14
namespace InteropTests
15
15
{
16
+ // All interop test cases, minus GCE authentication specific tests.
17
+ // Tests are separate methods so that they can be quarantined separately.
16
18
public class InteropTests
17
19
{
18
20
private static readonly TimeSpan DefaultTimeout = TimeSpan . FromSeconds ( 30 ) ;
@@ -25,10 +27,62 @@ public InteropTests(ITestOutputHelper output)
25
27
_output = output ;
26
28
}
27
29
28
- [ Theory ]
30
+ [ Fact ]
31
+ public Task EmptyUnary ( ) => InteropTestCase ( "empty_unary" ) ;
32
+
33
+ [ Fact ]
34
+ public Task LargeUnary ( ) => InteropTestCase ( "large_unary" ) ;
35
+
36
+ [ Fact ]
37
+ public Task ClientStreaming ( ) => InteropTestCase ( "client_streaming" ) ;
38
+
39
+ [ Fact ]
40
+ public Task ServerStreaming ( ) => InteropTestCase ( "server_streaming" ) ;
41
+
42
+ [ Fact ]
29
43
[ QuarantinedTest ( "https://github.com/dotnet/aspnetcore/issues/22101" ) ]
30
- [ MemberData ( nameof ( TestCaseData ) ) ]
31
- public async Task InteropTestCase ( string name )
44
+ public Task PingPong ( ) => InteropTestCase ( "ping_pong" ) ;
45
+
46
+ [ Fact ]
47
+ public Task EmptyStream ( ) => InteropTestCase ( "empty_stream" ) ;
48
+
49
+ [ Fact ]
50
+ public Task CancelAfterBegin ( ) => InteropTestCase ( "cancel_after_begin" ) ;
51
+
52
+ [ Fact ]
53
+ public Task CancelAfterFirstResponse ( ) => InteropTestCase ( "cancel_after_first_response" ) ;
54
+
55
+ [ Fact ]
56
+ public Task TimeoutOnSleepingServer ( ) => InteropTestCase ( "timeout_on_sleeping_server" ) ;
57
+
58
+ [ Fact ]
59
+ public Task CustomMetadata ( ) => InteropTestCase ( "custom_metadata" ) ;
60
+
61
+ [ Fact ]
62
+ public Task StatusCodeAndMessage ( ) => InteropTestCase ( "status_code_and_message" ) ;
63
+
64
+ [ Fact ]
65
+ public Task SpecialStatusMessage ( ) => InteropTestCase ( "special_status_message" ) ;
66
+
67
+ [ Fact ]
68
+ public Task UnimplementedService ( ) => InteropTestCase ( "unimplemented_service" ) ;
69
+
70
+ [ Fact ]
71
+ public Task UnimplementedMethod ( ) => InteropTestCase ( "unimplemented_method" ) ;
72
+
73
+ [ Fact ]
74
+ public Task ClientCompressedUnary ( ) => InteropTestCase ( "client_compressed_unary" ) ;
75
+
76
+ [ Fact ]
77
+ public Task ClientCompressedStreaming ( ) => InteropTestCase ( "client_compressed_streaming" ) ;
78
+
79
+ [ Fact ]
80
+ public Task ServerCompressedUnary ( ) => InteropTestCase ( "server_compressed_unary" ) ;
81
+
82
+ [ Fact ]
83
+ public Task ServerCompressedStreaming ( ) => InteropTestCase ( "server_compressed_streaming" ) ;
84
+
85
+ private async Task InteropTestCase ( string name )
32
86
{
33
87
using ( var serverProcess = new WebsiteProcess ( _serverPath , _output ) )
34
88
{
@@ -44,33 +98,5 @@ public async Task InteropTestCase(string name)
44
98
}
45
99
}
46
100
}
47
-
48
- #region TestData
49
- // All interop test cases, minus GCE authentication specific tests
50
- private static string [ ] AllTests = new string [ ]
51
- {
52
- "empty_unary" ,
53
- "large_unary" ,
54
- "client_streaming" ,
55
- "server_streaming" ,
56
- "ping_pong" ,
57
- "empty_stream" ,
58
-
59
- "cancel_after_begin" ,
60
- "cancel_after_first_response" ,
61
- "timeout_on_sleeping_server" ,
62
- "custom_metadata" ,
63
- "status_code_and_message" ,
64
- "special_status_message" ,
65
- "unimplemented_service" ,
66
- "unimplemented_method" ,
67
- "client_compressed_unary" ,
68
- "client_compressed_streaming" ,
69
- "server_compressed_unary" ,
70
- "server_compressed_streaming"
71
- } ;
72
-
73
- public static IEnumerable < object [ ] > TestCaseData => AllTests . Select ( t => new object [ ] { t } ) ;
74
- #endregion
75
101
}
76
102
}
0 commit comments