* Updates based on documentation * Getting the build passing * Getting app functioning * A few cleanups to confirm it's working as expected * Fixing functional tests * Updating dockerfile for 3.0 * Functional Tests now run sequentially * Updating to latest version of moq * Adding migration for post 3.0 upgrades * Removing commented out lines * Moving address and catalogitemordered configuration in to classes that own them * Minor cleanups
31 lines
898 B
C#
31 lines
898 B
C#
using Microsoft.eShopWeb.Web;
|
|
using System.Net.Http;
|
|
using System.Threading.Tasks;
|
|
using Xunit;
|
|
|
|
namespace Microsoft.eShopWeb.FunctionalTests.Web.Controllers
|
|
{
|
|
[Collection("Sequential")]
|
|
public class CatalogControllerIndex : IClassFixture<CustomWebApplicationFactory<Startup>>
|
|
{
|
|
public CatalogControllerIndex(CustomWebApplicationFactory<Startup> 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);
|
|
}
|
|
}
|
|
}
|