// 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; using System.Net.Http; using System.Threading.Tasks; using Xunit; namespace Microsoft.AspNetCore.Mvc.FunctionalTests { public class FSharpWebSiteTest : IClassFixture> { public FSharpWebSiteTest(MvcTestFixture fixture) { Client = fixture.Client; } public HttpClient Client { get; } [Fact] public async Task HomeIndex_ReturnsHtml() { // Act var response = await Client.GetAsync("http://localhost/"); var responseBody = await response.Content.ReadAsStringAsync(); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Contains("

Hello from FSharpWebSite

", responseBody); } } }