// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Net.Http; using System.Threading.Tasks; using Xunit; namespace Microsoft.AspNet.Mvc.FunctionalTests { public class DependencyResolverTests : IClassFixture> { public DependencyResolverTests(MvcTestFixture fixture) { Client = fixture.Client; } public HttpClient Client { get; } [Theory] [InlineData("http://localhost/di", "

Builder Output: Hello from builder.

")] [InlineData("http://localhost/basic", "

Hello From Basic View

")] public async Task AutofacDIContainerCanUseMvc(string url, string expectedResponseBody) { // Arrange & Act & Assert (does not throw) // Make a request to start resolving DI pieces var responseText = await Client.GetStringAsync(url); Assert.Equal(expectedResponseBody, responseText); } } }