@@ -28,12 +28,12 @@ public static void Setup(TestContext testContext)
28
28
":61046,\" eta\" :2393,\" delegation\" :3}]}" ,
29
29
StatusCode = 200 ,
30
30
StatusDescription = "Ok" ,
31
- Url = ( "https://api.dev. ssllabs.com/api/fa78d5a4 /analyze?host=" + TestHost )
31
+ Url = ( "https://api.ssllabs.com/api/v2 /analyze?host=" + TestHost )
32
32
} ;
33
33
34
34
mockedApiProvider . Setup ( x => x . MakeGetRequest ( It . IsAny < RequestModel > ( ) ) ) . Returns ( webResponseModel ) ;
35
35
36
- var ssllService = new SSLLabsApiService ( "https://api.dev. ssllabs.com/api/fa78d5a4 /" , mockedApiProvider . Object ) ;
36
+ var ssllService = new SSLLabsApiService ( "https://api.ssllabs.com/api/v2 /" , mockedApiProvider . Object ) ;
37
37
Response = ssllService . Analyze ( TestHost ) ;
38
38
}
39
39
@@ -59,12 +59,12 @@ public static void Setup(TestContext testContext)
59
59
"\" criteriaVersion\" :\" 2009i\" }" ,
60
60
StatusCode = 200 ,
61
61
StatusDescription = "Ok" ,
62
- Url = ( "https://api.dev. ssllabs.com/api/fa78d5a4 /analyze?host=" + TestHost )
62
+ Url = ( "https://api.ssllabs.com/api/v2 /analyze?host=" + TestHost )
63
63
} ;
64
64
65
65
mockedApiProvider . Setup ( x => x . MakeGetRequest ( It . IsAny < RequestModel > ( ) ) ) . Returns ( webResponseModel ) ;
66
66
67
- var ssllService = new SSLLabsApiService ( "https://api.dev. ssllabs.com/api/fa78d5a4 /" , mockedApiProvider . Object ) ;
67
+ var ssllService = new SSLLabsApiService ( "https://api.ssllabs.com/api/v2 /" , mockedApiProvider . Object ) ;
68
68
Response = ssllService . Analyze ( TestHost ) ;
69
69
}
70
70
@@ -92,14 +92,14 @@ public static void Setup(TestContext testContext)
92
92
"{\" ipAddress\" :\" 104.28.7.2\" ,\" statusMessage\" :\" Pending\" ,\" progress\" :-1,\" eta\" :-1,\" delegation\" :3}]}" ,
93
93
StatusCode = 200 ,
94
94
StatusDescription = "Ok" ,
95
- Url = ( "https://api.dev. ssllabs.com/api/fa78d5a4 /analyze?host=" + TestHost + "&publish=on&all=done" )
95
+ Url = ( "https://api.ssllabs.com/api/v2 /analyze?host=" + TestHost + "&publish=on&all=done" )
96
96
} ;
97
97
98
98
mockedApiProvider . Setup ( x => x . MakeGetRequest ( It . IsAny < RequestModel > ( ) ) ) . Returns ( webResponseModel ) ;
99
99
100
- var ssllService = new SSLLabsApiService ( "https://api.dev. ssllabs.com/api/fa78d5a4 /" , mockedApiProvider . Object ) ;
101
- Response = ssllService . Analyze ( TestHost , SSLLabsApiService . Publish . On , SSLLabsApiService . ClearCache . On ,
102
- SSLLabsApiService . FromCache . Ignore , SSLLabsApiService . All . Done ) ;
100
+ var ssllService = new SSLLabsApiService ( "https://api.ssllabs.com/api/v2 /" , mockedApiProvider . Object ) ;
101
+ Response = ssllService . Analyze ( TestHost , SSLLabsApiService . Publish . On , SSLLabsApiService . startNew . On ,
102
+ SSLLabsApiService . FromCache . Ignore , null , SSLLabsApiService . All . Done , SSLLabsApiService . ignoreMismatch . Off ) ;
103
103
}
104
104
105
105
[ TestMethod ]
@@ -124,25 +124,25 @@ public static void Setup(TestContext testContext)
124
124
"\" engineVersion\" :\" 1.12.8\" ,\" criteriaVersion\" :\" 2009i\" ,\" cacheExpiryTime\" :1422478858017}" ,
125
125
StatusCode = 200 ,
126
126
StatusDescription = "Ok" ,
127
- Url = ( "https://api.dev. ssllabs.com/api/fa78d5a4 /analyze?host=" + TestHost )
127
+ Url = ( "https://api.ssllabs.com/api/v2 /analyze?host=" + TestHost )
128
128
} ;
129
129
130
130
mockedApiProvider . Setup ( x => x . MakeGetRequest ( It . IsAny < RequestModel > ( ) ) ) . Returns ( webResponseModel ) ;
131
131
132
- var ssllService = new SSLLabsApiService ( "https://api.dev. ssllabs.com/api/fa78d5a4 /" , mockedApiProvider . Object ) ;
133
- Response = ssllService . Analyze ( TestHost , SSLLabsApiService . Publish . On , SSLLabsApiService . ClearCache . On ,
134
- SSLLabsApiService . FromCache . Ignore , SSLLabsApiService . All . Done ) ;
132
+ var ssllService = new SSLLabsApiService ( "https://api.ssllabs.com/api/v2 /" , mockedApiProvider . Object ) ;
133
+ Response = ssllService . Analyze ( TestHost , SSLLabsApiService . Publish . On , SSLLabsApiService . startNew . On ,
134
+ SSLLabsApiService . FromCache . Ignore , null , SSLLabsApiService . All . Done , SSLLabsApiService . ignoreMismatch . Off ) ;
135
135
}
136
136
137
137
[ TestMethod ]
138
- public void then_the_status_code_should_be_valid_for_response ( )
138
+ public new void then_the_status_code_should_be_valid_for_response ( )
139
139
{
140
140
Response . Header . statusCode . Should ( ) . Be ( 200 ) ;
141
141
}
142
142
}
143
143
144
144
[ TestClass ]
145
- public class when_a_invalid_request_is_made_with_both_clearCache_and_fromCache : NegativeTests
145
+ public class when_a_invalid_request_is_made_with_both_startNew_and_fromCache : NegativeTests
146
146
{
147
147
[ ClassInitialize ]
148
148
public static void Setup ( TestContext testContext )
@@ -151,17 +151,17 @@ public static void Setup(TestContext testContext)
151
151
TestHost = "https://www.ashleypoole.co.uk" ;
152
152
var webResponseModel = new WebResponseModel ( )
153
153
{
154
- Payloay = "{\" errors\" :[{\" message\" :\" Parameters \u0027 fromCache\u0027 and \u0027 clearCache \u0027 cannot be used at the same time\" }]}" ,
154
+ Payloay = "{\" errors\" :[{\" message\" :\" Parameters \u0027 fromCache\u0027 and \u0027 startNew \u0027 cannot be used at the same time\" }]}" ,
155
155
StatusCode = 400 ,
156
156
StatusDescription = "Ok" ,
157
- Url = ( "https://api.dev. ssllabs.com/api/fa78d5a4 /analyze?host=" + TestHost + "&clearCache =on&fromCache=on&all=done" )
157
+ Url = ( "https://api.ssllabs.com/api/v2 /analyze?host=" + TestHost + "&startNew =on&fromCache=on&all=done" )
158
158
} ;
159
159
160
160
mockedApiProvider . Setup ( x => x . MakeGetRequest ( It . IsAny < RequestModel > ( ) ) ) . Returns ( webResponseModel ) ;
161
161
162
- var ssllService = new SSLLabsApiService ( "https://api.dev. ssllabs.com/api/fa78d5a4 /" , mockedApiProvider . Object ) ;
163
- Response = ssllService . Analyze ( TestHost , SSLLabsApiService . Publish . On , SSLLabsApiService . ClearCache . On ,
164
- SSLLabsApiService . FromCache . Ignore , SSLLabsApiService . All . Done ) ;
162
+ var ssllService = new SSLLabsApiService ( "https://api.ssllabs.com/api/v2 /" , mockedApiProvider . Object ) ;
163
+ Response = ssllService . Analyze ( TestHost , SSLLabsApiService . Publish . On , SSLLabsApiService . startNew . On ,
164
+ SSLLabsApiService . FromCache . Ignore , null , SSLLabsApiService . All . Done , SSLLabsApiService . ignoreMismatch . Off ) ;
165
165
}
166
166
}
167
167
@@ -174,7 +174,7 @@ public static void Setup(TestContext testContext)
174
174
var mockedApiProvider = new Mock < IApiProvider > ( ) ;
175
175
TestHost = "www.ashleypoole.somereallybadurl" ;
176
176
177
- var ssllService = new SSLLabsApiService ( "https://api.dev. ssllabs.com/api/fa78d5a4 /" , mockedApiProvider . Object ) ;
177
+ var ssllService = new SSLLabsApiService ( "https://api.ssllabs.com/api/v2 /" , mockedApiProvider . Object ) ;
178
178
Response = ssllService . Analyze ( TestHost ) ;
179
179
}
180
180
0 commit comments