File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
tests/NetEvolve.HealthChecks.Tests.Unit/Azure.Synapse Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace NetEvolve . HealthChecks . Tests . Unit . Azure . Synapse ;
2
+
3
+ using System . Diagnostics ;
4
+ using Microsoft . Extensions . DependencyInjection ;
5
+ using NetEvolve . Extensions . TUnit ;
6
+ using NetEvolve . HealthChecks . Azure . Synapse ;
7
+
8
+ [ TestGroup ( $ "{ nameof ( Azure ) } .{ nameof ( Synapse ) } ") ]
9
+ public class ClientCreationTests
10
+ {
11
+ [ Test ]
12
+ public void CreateArtifactsClient_InvalidMode_ThrowUnreachableException ( )
13
+ {
14
+ var options = new SynapseWorkspaceAvailableOptions { Mode = ( SynapseClientCreationMode ) 13 } ;
15
+ var serviceProvider = new ServiceCollection ( ) . BuildServiceProvider ( ) ;
16
+
17
+ _ = Assert . Throws < UnreachableException > ( ( ) => ClientCreation . CreateArtifactsClient ( options , serviceProvider ) ) ;
18
+ }
19
+
20
+ [ Test ]
21
+ public void CreateArtifactsClient_ModeServiceProvider_ThrowUnreachableException ( )
22
+ {
23
+ var options = new SynapseWorkspaceAvailableOptions { Mode = SynapseClientCreationMode . ServiceProvider } ;
24
+ var serviceProvider = new ServiceCollection ( ) . BuildServiceProvider ( ) ;
25
+
26
+ _ = Assert . Throws < UnreachableException > ( ( ) => ClientCreation . CreateArtifactsClient ( options , serviceProvider ) ) ;
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments