public async Task GetStatus_ValidJobIdGiven_ShouldReturnJobStatus(string httpClientResponseXml) { const string expectedJobId = "FB6DD4B0-A2BB-11E3-A5E2-0800200C9A66"; var wpsClient = new WpsClient(new HttpClient(GetMockedMessageHandlerForResponse(httpClientResponseXml)), new XmlSerializationService()); var status = await wpsClient.GetJobStatus(MockUri, expectedJobId); status.Should().NotBeNull(); status.JobId.Should().Be(expectedJobId); }
public async Task GetExceptionForRequest_NullWpsUriGiven_ShouldThrowArgumentNullException() { var wpsClient = new WpsClient(new HttpClient(), new XmlSerializationService()); await Assert.ThrowsAsync <ArgumentNullException>(() => wpsClient.GetJobStatus(null, string.Empty)); }
public async Task GetResult_NullJobIdGiven_ShouldThrowArgumentNullException() { var wpsClient = new WpsClient(new HttpClient(), new XmlSerializationService()); await Assert.ThrowsAsync <ArgumentNullException>(() => wpsClient.GetJobStatus(MockUri, null)); }