Exemple #1
0
        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);
        }
Exemple #2
0
        public async Task GetExceptionForRequest_NullWpsUriGiven_ShouldThrowArgumentNullException()
        {
            var wpsClient = new WpsClient(new HttpClient(), new XmlSerializationService());

            await Assert.ThrowsAsync <ArgumentNullException>(() => wpsClient.GetJobStatus(null, string.Empty));
        }
Exemple #3
0
        public async Task GetResult_NullJobIdGiven_ShouldThrowArgumentNullException()
        {
            var wpsClient = new WpsClient(new HttpClient(), new XmlSerializationService());

            await Assert.ThrowsAsync <ArgumentNullException>(() => wpsClient.GetJobStatus(MockUri, null));
        }