public async Task It_supports_models_that_use_containment() { using (WebApp.Start(HttpClientUtils.BaseAddress, appBuilder => Configuration(appBuilder, typeof(AccountsController)))) { // Arrange var httpClient = HttpClientUtils.GetHttpClient(HttpClientUtils.BaseAddress); // Act var swaggerDocument = await httpClient.GetJsonAsync <SwaggerDocument>("swagger/docs/v1"); // Assert PathItem pathItem; swaggerDocument.paths.TryGetValue("/odata/Accounts", out pathItem); pathItem.Should().NotBeNull(); await ValidationUtils.ValidateSwaggerJson(); } }
public async Task It_supports_odata_attribute_routing() { using (WebApp.Start(HttpClientUtils.BaseAddress, appBuilder => Configuration(appBuilder, typeof(AccountsController)))) { // Arrange var httpClient = HttpClientUtils.GetHttpClient(HttpClientUtils.BaseAddress); // Act var swaggerDocument = await httpClient.GetJsonAsync <SwaggerDocument>("swagger/docs/v1"); // Assert PathItem pathItem; swaggerDocument.paths.TryGetValue("/odata/Accounts({accountId})/PayinPIs({paymentInstrumentId})", out pathItem); pathItem.Should().NotBeNull(); await ValidationUtils.ValidateSwaggerJson(); } }