Skip to content

Commit 6523f23

Browse files
committed
Fixing build warning and updating api url
1 parent 457a1e0 commit 6523f23

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

SSLLabsApiWrapper.Tests/AnalyzeTests.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public static void Setup(TestContext testContext)
2828
":61046,\"eta\":2393,\"delegation\":3}]}",
2929
StatusCode = 200,
3030
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)
3232
};
3333

3434
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
3535

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);
3737
Response = ssllService.Analyze(TestHost);
3838
}
3939

@@ -59,12 +59,12 @@ public static void Setup(TestContext testContext)
5959
"\"criteriaVersion\":\"2009i\"}",
6060
StatusCode = 200,
6161
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)
6363
};
6464

6565
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
6666

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);
6868
Response = ssllService.Analyze(TestHost);
6969
}
7070

@@ -92,12 +92,12 @@ public static void Setup(TestContext testContext)
9292
"{\"ipAddress\":\"104.28.7.2\",\"statusMessage\":\"Pending\",\"progress\":-1,\"eta\":-1,\"delegation\":3}]}",
9393
StatusCode = 200,
9494
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")
9696
};
9797

9898
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
9999

100-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
100+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
101101
Response = ssllService.Analyze(TestHost, SSLLabsApiService.Publish.On, SSLLabsApiService.startNew.On,
102102
SSLLabsApiService.FromCache.Ignore, null, SSLLabsApiService.All.Done, SSLLabsApiService.ignoreMismatch.Off);
103103
}
@@ -124,18 +124,18 @@ public static void Setup(TestContext testContext)
124124
"\"engineVersion\":\"1.12.8\",\"criteriaVersion\":\"2009i\",\"cacheExpiryTime\":1422478858017}",
125125
StatusCode = 200,
126126
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)
128128
};
129129

130130
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
131131

132-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
132+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
133133
Response = ssllService.Analyze(TestHost, SSLLabsApiService.Publish.On, SSLLabsApiService.startNew.On,
134134
SSLLabsApiService.FromCache.Ignore, null, SSLLabsApiService.All.Done, SSLLabsApiService.ignoreMismatch.Off);
135135
}
136136

137137
[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()
139139
{
140140
Response.Header.statusCode.Should().Be(200);
141141
}
@@ -154,12 +154,12 @@ public static void Setup(TestContext testContext)
154154
Payloay = "{\"errors\":[{\"message\":\"Parameters \u0027fromCache\u0027 and \u0027startNew\u0027 cannot be used at the same time\"}]}",
155155
StatusCode = 400,
156156
StatusDescription = "Ok",
157-
Url = ("https://api.dev.ssllabs.com/api/fa78d5a4/analyze?host=" + TestHost + "&startNew=on&fromCache=on&all=done")
157+
Url = ("https://api.ssllabs.com/api/v2/analyze?host=" + TestHost + "&startNew=on&fromCache=on&all=done")
158158
};
159159

160160
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
161161

162-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
162+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
163163
Response = ssllService.Analyze(TestHost, SSLLabsApiService.Publish.On, SSLLabsApiService.startNew.On,
164164
SSLLabsApiService.FromCache.Ignore, null, SSLLabsApiService.All.Done, SSLLabsApiService.ignoreMismatch.Off);
165165
}
@@ -174,7 +174,7 @@ public static void Setup(TestContext testContext)
174174
var mockedApiProvider = new Mock<IApiProvider>();
175175
TestHost = "www.ashleypoole.somereallybadurl";
176176

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);
178178
Response = ssllService.Analyze(TestHost);
179179
}
180180

SSLLabsApiWrapper.Tests/GetEndpointDetailsTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ public static void Setup(TestContext testContext)
120120
",\"heartbleed\":false,\"heartbeat\":false,\"openSslCcs\":1,\"poodleTls\":1}}",
121121
StatusCode = 200,
122122
StatusDescription = "Ok",
123-
Url = ("https://api.dev.ssllabs.com/api/fa78d5a4/getEndpoint?host=" + TestHost + "%s=" + TestIP)
123+
Url = ("https://api.ssllabs.com/api/v2/getEndpoint?host=" + TestHost + "%s=" + TestIP)
124124
};
125125

126126
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
127127

128-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
128+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
129129
Response = ssllService.GetEndpointData(TestHost, TestIP);
130130
}
131131

@@ -174,12 +174,12 @@ public static void Setup(TestContext testContext)
174174
Payloay = "{\"errors\":[{\"message\":\"Endpoint not found\"}]}",
175175
StatusCode = 400,
176176
StatusDescription = "Bad Request",
177-
Url = ("https://api.dev.ssllabs.com/api/fa78d5a4/getEndpointData?host=" + TestHost + "s=" + TestIP)
177+
Url = ("https://api.ssllabs.com/api/v2/getEndpointData?host=" + TestHost + "s=" + TestIP)
178178
};
179179

180180
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
181181

182-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
182+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
183183
Response = ssllService.GetEndpointData(TestHost, TestIP);
184184
}
185185

@@ -197,7 +197,7 @@ public class when_a_invalid_request_is_made_with_malformed_url_hostname : Negati
197197
public static void Setup(TestContext testContext)
198198
{
199199
var mockedApiProvider = new Mock<IApiProvider>();
200-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
200+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
201201

202202
TestHost = "www.ashleypoole.somereallybadurl";
203203
TestIP = "111.111.111.111";

SSLLabsApiWrapper.Tests/InfoTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ public static void Setup(TestContext testContext)
2121
Payloay = "{\"engineVersion\":\"1.11.4\",\"criteriaVersion\":\"2009i\",\"clientMaxAssessments\":5,\"notice\":\"Some notice goes here\"}",
2222
StatusCode = 200,
2323
StatusDescription = "Ok",
24-
Url = "https://api.dev.ssllabs.com/api/fa78d5a4/info"
24+
Url = "https://api.ssllabs.com/api/v2/info"
2525
};
2626

2727
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
2828

29-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
29+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
3030
Response = ssllService.Info();
3131
}
3232

@@ -61,12 +61,12 @@ public static void Setup(TestContext testContext)
6161
Payloay = null,
6262
StatusCode = 0,
6363
StatusDescription = null,
64-
Url = "https://api.dev.ssllabs.com/api/fa78d5a4/info"
64+
Url = "https://api.ssllabs.com/api/v2/info"
6565
};
6666

6767
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
6868

69-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
69+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
7070
Response = ssllService.Info();
7171
}
7272

SSLLabsApiWrapper.Tests/StatusCodesTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public static void Setup(TestContext testContext)
4141
"Testing Long Handshake (might take a while)\"}}",
4242
StatusCode = 200,
4343
StatusDescription = "Ok",
44-
Url = "https://api.dev.ssllabs.com/api/fa78d5a4/info"
44+
Url = "https://api.ssllabs.com/api/v2/info"
4545
};
4646

4747
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
4848

49-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
49+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
5050
Response = ssllService.GetStatusCodes();
5151
}
5252

@@ -69,12 +69,12 @@ public static void Setup(TestContext testContext)
6969
Payloay = null,
7070
StatusCode = 0,
7171
StatusDescription = null,
72-
Url = "https://api.dev.ssllabs.com/api/fa78d5a4/info"
72+
Url = "https://api.ssllabs.com/api/v2/info"
7373
};
7474

7575
mockedApiProvider.Setup(x => x.MakeGetRequest(It.IsAny<RequestModel>())).Returns(webResponseModel);
7676

77-
var ssllService = new SSLLabsApiService("https://api.dev.ssllabs.com/api/fa78d5a4/", mockedApiProvider.Object);
77+
var ssllService = new SSLLabsApiService("https://api.ssllabs.com/api/v2/", mockedApiProvider.Object);
7878
Response = ssllService.GetStatusCodes();
7979
}
8080

0 commit comments

Comments
 (0)