47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
// 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.IO;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Testing.xunit;
|
|
using Microsoft.Extensions.Logging.Testing;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace FunctionalTests
|
|
{
|
|
[OSSkipCondition(OperatingSystems.Linux)]
|
|
[OSSkipCondition(OperatingSystems.MacOSX)]
|
|
public class SimpleAppTest_Desktop :
|
|
LoggedTest, IClassFixture<DesktopApplicationTestFixture<SimpleApp.Startup>>
|
|
{
|
|
public SimpleAppTest_Desktop(
|
|
DesktopApplicationTestFixture<SimpleApp.Startup> fixture,
|
|
ITestOutputHelper output)
|
|
: base(output)
|
|
{
|
|
Fixture = fixture;
|
|
}
|
|
|
|
public ApplicationTestFixture Fixture { get; }
|
|
|
|
[ConditionalFact]
|
|
public async Task Precompilation_WorksForSimpleApps()
|
|
{
|
|
using (StartLog(out var loggerFactory))
|
|
{
|
|
// Arrange
|
|
var deployment = await Fixture.CreateDeploymentAsync(loggerFactory);
|
|
|
|
// Act
|
|
var response = await deployment.HttpClient.GetStringWithRetryAsync(
|
|
deployment.ApplicationBaseUri,
|
|
loggerFactory.CreateLogger(Fixture.ApplicationName));
|
|
|
|
// Assert
|
|
TestEmbeddedResource.AssertContent("SimpleAppTest.Home.Index.txt", response);
|
|
}
|
|
}
|
|
}
|
|
}
|