public async Task DescribeProcess_ValidStringIdentifiersGiven_ShouldReturnTwoProcesses(string httpClientResponseXml) { var wpsClient = new WpsClient(new HttpClient(GetMockedMessageHandlerForResponse(httpClientResponseXml)), new XmlSerializationService()); var collection = await wpsClient.DescribeProcess(MockUri, "i.gensigset", "i.gensig"); collection.Should().HaveCount(2); }
public async Task DescribeProcess_InvalidSummariesGiven_ShouldThrowOwsException(string httpClientResponseXml) { var summaries = new[] { new ProcessSummary { Identifier = "invalid 1" }, new ProcessSummary { Identifier = "invalid 2" } }; var wpsClient = new WpsClient(new HttpClient(GetMockedMessageHandlerForResponse(httpClientResponseXml, HttpStatusCode.BadRequest)), new XmlSerializationService()); await Assert.ThrowsAsync <OwsException>(() => wpsClient.DescribeProcess(MockUri, summaries)); }
public async Task DescribeProcess_EmptyIdentifiersGiven_ShouldThrowArgumentNullException() { var wpsClient = new WpsClient(new HttpClient(), new XmlSerializationService()); await Assert.ThrowsAsync <InvalidOperationException>(() => wpsClient.DescribeProcess(MockUri, new string[0])); }
public async Task DescribeProcess_NullUriGiven_ShouldThrowArgumentNullException() { var wpsClient = new WpsClient(new HttpClient(), new XmlSerializationService()); await Assert.ThrowsAsync <ArgumentNullException>(() => wpsClient.DescribeProcess(null, string.Empty)); }