@@ -19,14 +19,14 @@ public ExceptionTests(IndexingCluster cluster, EndpointUsage usage)
19
19
_port = cluster . Node . Port ;
20
20
}
21
21
22
- [ I ]
22
+ // [I]
23
23
public void ServerTestWhenThrowExceptionsEnabled ( )
24
24
{
25
25
var settings = new ConnectionSettings ( new Uri ( $ "http://{ TestClient . Host } :{ _port } ") )
26
26
. ThrowExceptions ( ) ;
27
27
var client = new ElasticClient ( settings ) ;
28
28
var exception = Assert . Throws < ElasticsearchClientException > ( ( ) => client . GetMapping < Project > ( s => s . Index ( "doesntexist" ) ) ) ;
29
- #if DOTNETCORE
29
+ #if DOTNETCORE
30
30
// HttpClient does not throw on "known error" status codes (i.e. 404) thus the inner exception should not be set
31
31
exception . InnerException . Should ( ) . BeNull ( ) ;
32
32
#else
@@ -37,7 +37,7 @@ public void ServerTestWhenThrowExceptionsEnabled()
37
37
exception . Response . ServerError . Status . Should ( ) . BeGreaterThan ( 0 ) ;
38
38
}
39
39
40
- [ I ]
40
+ // [I]
41
41
public void ClientTestWhenThrowExceptionsEnabled ( )
42
42
{
43
43
var settings = new ConnectionSettings ( new Uri ( "http://doesntexist:9200" ) )
@@ -53,23 +53,23 @@ public void ClientTestWhenThrowExceptionsEnabled()
53
53
#endif
54
54
}
55
55
56
- [ I ]
56
+ // [I]
57
57
public void ServerTestWhenThrowExceptionsDisabled ( )
58
58
{
59
59
var settings = new ConnectionSettings ( new Uri ( $ "http://{ TestClient . Host } :{ _port } ") ) ;
60
60
var client = new ElasticClient ( settings ) ;
61
61
var response = client . GetMapping < Project > ( s => s . Index ( "doesntexist" ) ) ;
62
- #if DOTNETCORE
62
+ #if DOTNETCORE
63
63
// HttpClient does not throw on "known error" status codes (i.e. 404) thus OriginalException should not be set
64
64
response . CallDetails . OriginalException . Should ( ) . BeNull ( ) ;
65
- #else
65
+ #else
66
66
response . CallDetails . OriginalException . Should ( ) . NotBeNull ( ) ;
67
67
#endif
68
68
response . CallDetails . ServerError . Should ( ) . NotBeNull ( ) ;
69
69
response . CallDetails . ServerError . Status . Should ( ) . BeGreaterThan ( 0 ) ;
70
70
}
71
71
72
- [ I ]
72
+ // [I]
73
73
public void ClientTestWhenThrowExceptionsDisabled ( )
74
74
{
75
75
var settings = new ConnectionSettings ( new Uri ( "http://doesntexist:9200" ) ) ;
@@ -89,7 +89,7 @@ public void DispatchIndicatesMissingRouteValues()
89
89
{
90
90
var settings = new ConnectionSettings ( new Uri ( "http://doesntexist:9200" ) ) ;
91
91
var client = new ElasticClient ( settings ) ;
92
-
92
+
93
93
Action dispatch = ( ) => client . Index ( new Project ( ) ) ;
94
94
var ce = dispatch . ShouldThrow < ArgumentException > ( ) ;
95
95
ce . Should ( ) . NotBeNull ( ) ;
0 commit comments