* udated to .net6 * used the .net6 version RC2 * added editconfig. * App core new Scoped Namespaces style. * BlazorAdmin new Scoped Namespaces style. * Blazor Shared new Scoped Namespaces style. * Infra new Scoped Namespaces style. * public api new Scoped Namespaces style. * web new Scoped Namespaces style. * FunctionalTests new Scoped Namespaces style. * Integrational tests new Scoped Namespaces style. * unit tests new Scoped Namespaces style. * update github action. * update github action. * change the global.
30 lines
772 B
C#
30 lines
772 B
C#
using System.Net.Http;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.eShopWeb.FunctionalTests.Web;
|
|
using Xunit;
|
|
|
|
namespace Microsoft.eShopWeb.FunctionalTests.WebRazorPages;
|
|
|
|
[Collection("Sequential")]
|
|
public class HomePageOnGet : IClassFixture<WebTestFixture>
|
|
{
|
|
public HomePageOnGet(WebTestFixture factory)
|
|
{
|
|
Client = factory.CreateClient();
|
|
}
|
|
|
|
public HttpClient Client { get; }
|
|
|
|
[Fact]
|
|
public async Task ReturnsHomePageWithProductListing()
|
|
{
|
|
// Arrange & Act
|
|
var response = await Client.GetAsync("/");
|
|
response.EnsureSuccessStatusCode();
|
|
var stringResponse = await response.Content.ReadAsStringAsync();
|
|
|
|
// Assert
|
|
Assert.Contains(".NET Bot Black Sweatshirt", stringResponse);
|
|
}
|
|
}
|