parent
90235c7008
commit
1d76db4d36
|
|
@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Http;
|
|||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
|
||||
namespace LocalizationSample
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,18 +5,15 @@ using System.IO;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Server.Testing;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
||||
{
|
||||
public class LocalizationSampleTest
|
||||
{
|
||||
private static readonly string _applicationPath =
|
||||
#if NET451
|
||||
Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", "..", "samples", "LocalizationSample"));
|
||||
#else
|
||||
Path.GetFullPath(Path.Combine("..", "..", "samples", "LocalizationSample"));
|
||||
#endif
|
||||
private static readonly string _applicationPath = Path.GetFullPath(
|
||||
Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "..", "..", "..", "..", "..", "..", "samples", "LocalizationSample"));
|
||||
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
|
|
|
|||
|
|
@ -5,18 +5,15 @@ using System.IO;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Server.Testing;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
||||
{
|
||||
public class LocalizationTest
|
||||
{
|
||||
private static readonly string _applicationPath =
|
||||
#if NET451
|
||||
Path.GetFullPath(Path.Combine("..", "..", "..", "..", "..", "LocalizationWebsite"));
|
||||
#else
|
||||
Path.GetFullPath(Path.Combine("..", "LocalizationWebsite"));
|
||||
#endif
|
||||
private static readonly string _applicationPath = Path.GetFullPath(
|
||||
Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "..", "..", "..", "..", "..", "LocalizationWebsite"));
|
||||
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
public class TestRunner
|
||||
{
|
||||
private string _applicationPath;
|
||||
|
||||
public TestRunner(string applicationPath){
|
||||
|
||||
public TestRunner(string applicationPath)
|
||||
{
|
||||
_applicationPath = applicationPath;
|
||||
}
|
||||
|
||||
|
||||
private async Task<string> RunTestAndGetResponse(
|
||||
RuntimeFlavor runtimeFlavor,
|
||||
RuntimeArchitecture runtimeArchitecture,
|
||||
|
|
@ -61,7 +62,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task RunTestAndVerifyResponse(
|
||||
RuntimeFlavor runtimeFlavor,
|
||||
RuntimeArchitecture runtimeArchitecture,
|
||||
|
|
@ -74,7 +75,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
Console.WriteLine("Response Text " + responseText);
|
||||
Assert.Equal(expectedText, responseText);
|
||||
}
|
||||
|
||||
|
||||
public async Task RunTestAndVerifyResponseHeading(
|
||||
RuntimeFlavor runtimeFlavor,
|
||||
RuntimeArchitecture runtimeArchitecture,
|
||||
|
|
|
|||
Loading…
Reference in New Issue