Fix StringLocalizer location null tests (#321)
This commit is contained in:
parent
94b1875b28
commit
3ba495f32e
|
|
@ -42,7 +42,7 @@ namespace LocalizationWebsite
|
|||
}
|
||||
});
|
||||
|
||||
var stringLocalizer = stringLocalizerFactory.Create("Test", location: null);
|
||||
var stringLocalizer = stringLocalizerFactory.Create("Test", location: typeof(LocalizationWebsite.StartupResourcesAtRootFolder).Assembly.GetName().Name);
|
||||
|
||||
app.Run(async (context) =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,10 +43,8 @@ namespace LocalizationWebsite
|
|||
}
|
||||
});
|
||||
|
||||
var stringLocalizer = stringLocalizerFactory.Create("Test", location: null);
|
||||
var assembly = typeof(StartupResourcesInFolder).GetTypeInfo().Assembly;
|
||||
var assemblyName = new AssemblyName(assembly.FullName).Name;
|
||||
var stringLocalizerExplicitLocation = stringLocalizerFactory.Create("Test", assemblyName);
|
||||
var assemblyName = typeof(StartupResourcesInFolder).Assembly.GetName().Name;
|
||||
var stringLocalizer = stringLocalizerFactory.Create("Test", assemblyName);
|
||||
|
||||
app.Run(async (context) =>
|
||||
{
|
||||
|
|
@ -55,8 +53,6 @@ namespace LocalizationWebsite
|
|||
await context.Response.WriteAsync(stringLocalizer["Hello"]);
|
||||
await context.Response.WriteAsync(" ");
|
||||
await context.Response.WriteAsync(custromerStringLocalizer["Hello"]);
|
||||
await context.Response.WriteAsync(" ");
|
||||
await context.Response.WriteAsync(stringLocalizerExplicitLocation["Hello"]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
"http://localhost:5075/",
|
||||
"ResourcesInFolder",
|
||||
"fr-FR",
|
||||
"Bonjour from StartupResourcesInFolder Bonjour from Test in resources folder Bonjour from Customer in resources folder Bonjour from Test in resources folder");
|
||||
"Bonjour from StartupResourcesInFolder Bonjour from Test in resources folder Bonjour from Customer in resources folder");
|
||||
}
|
||||
|
||||
[Fact(Skip = "https://github.com/aspnet/Localization/issues/310")]
|
||||
|
|
@ -114,7 +114,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
"http://localhost:5076",
|
||||
"ResourcesInFolder",
|
||||
"fr-FR-test",
|
||||
"Bonjour from StartupResourcesInFolder Bonjour from Test in resources folder Bonjour from Customer in resources folder Bonjour from Test in resources folder");
|
||||
"Bonjour from StartupResourcesInFolder Bonjour from Test in resources folder Bonjour from Customer in resources folder");
|
||||
}
|
||||
|
||||
[ConditionalFact]
|
||||
|
|
@ -130,7 +130,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
"http://localhost:5077",
|
||||
"ResourcesInFolder",
|
||||
"fr-FR-test",
|
||||
"Bonjour from StartupResourcesInFolder Bonjour from Test in resources folder Bonjour from Customer in resources folder Bonjour from Test in resources folder");
|
||||
"Bonjour from StartupResourcesInFolder Bonjour from Test in resources folder Bonjour from Customer in resources folder");
|
||||
}
|
||||
|
||||
[Fact(Skip = "https://github.com/aspnet/Localization/issues/310")]
|
||||
|
|
@ -144,7 +144,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
"http://localhost:5078/",
|
||||
"ResourcesInFolder",
|
||||
"fr-FR-test-again-too-deep-to-work",
|
||||
"Hello Hello Hello Hello");
|
||||
"Hello Hello Hello");
|
||||
}
|
||||
|
||||
[ConditionalFact]
|
||||
|
|
@ -160,7 +160,7 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests
|
|||
"http://localhost:5079/",
|
||||
"ResourcesInFolder",
|
||||
"fr-FR-test-again-too-deep-to-work",
|
||||
"Hello Hello Hello Hello");
|
||||
"Hello Hello Hello");
|
||||
}
|
||||
|
||||
[Fact(Skip = "https://github.com/aspnet/Localization/issues/310")]
|
||||
|
|
|
|||
Loading…
Reference in New Issue