public void Create_ServiceShouldBeConfiguredAsOriginallyConfiguredInWebTest() { // Given var replacementServices = new ServiceCollection(); // When var testServer = AcceptanceTestServer.Create <WebAppSampleStartupWrapper>(replacementServices, ContentRoot); var enumerableService = testServer.GetService <IEnumerable>(); // Then Assert.IsType <ArrayList>(enumerableService); }
public void Create_ServiceShouldBeConfiguredWithReplacement() { // Given var replacementServices = new ServiceCollection { new ServiceDescriptor(typeof(IEnumerable), new SortedList()) }; // When var testServer = AcceptanceTestServer.Create <WebAppSampleStartupWrapper>(replacementServices, ContentRoot); var enumerableService = testServer.GetService <IEnumerable>(); // Then Assert.IsType <SortedList>(enumerableService); }