2018-08-01 06:12:42 +02:00
|
|
|
|
// // NotWorking.cs
|
|
|
|
|
|
// /*
|
|
|
|
|
|
// paul 21/06/2018 10:16 20182018 6 21
|
|
|
|
|
|
// */
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using Microsoft.Extensions.Localization;
|
|
|
|
|
|
using Microsoft.Extensions.OptionsModel;
|
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
using Yavsc;
|
2023-03-19 17:57:55 +00:00
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
2018-08-01 06:12:42 +02:00
|
|
|
|
using Microsoft.Dnx.TestHost.TestAdapter;
|
|
|
|
|
|
using Xunit.Abstractions;
|
|
|
|
|
|
|
2021-06-06 20:32:39 +01:00
|
|
|
|
namespace yavscTests
|
2018-08-01 06:12:42 +02:00
|
|
|
|
{
|
|
|
|
|
|
[Collection("Yavsc dropped intents")]
|
|
|
|
|
|
[Trait("regres", "yes")]
|
|
|
|
|
|
public class NotWorking : BaseTestContext
|
|
|
|
|
|
{
|
2020-09-09 16:44:17 +01:00
|
|
|
|
readonly SourceInformationProvider _sourceInfoProvider;
|
|
|
|
|
|
readonly IOptions<LocalizationOptions> _localizationOptions;
|
2021-03-10 01:41:31 +00:00
|
|
|
|
public NotWorking(
|
|
|
|
|
|
SourceInformationProvider sourceInfoProvider,
|
2018-08-01 06:12:42 +02:00
|
|
|
|
IOptions<LocalizationOptions> localizationOptions,
|
|
|
|
|
|
ServerSideFixture serverFixture, ITestOutputHelper output
|
2021-03-10 01:41:31 +00:00
|
|
|
|
) : base(output, serverFixture)
|
|
|
|
|
|
{
|
2018-08-01 06:12:42 +02:00
|
|
|
|
_sourceInfoProvider = sourceInfoProvider;
|
|
|
|
|
|
_localizationOptions = localizationOptions;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void StringLocalizer()
|
|
|
|
|
|
{
|
|
|
|
|
|
// TODO build applicationEnvironment
|
|
|
|
|
|
ResourceManagerStringLocalizerFactory strFact = new ResourceManagerStringLocalizerFactory
|
|
|
|
|
|
(applicationEnvironment, _localizationOptions);
|
|
|
|
|
|
IStringLocalizer stringLocalizer = strFact.Create(typeof(NotWorking));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void NoDnxEnv()
|
|
|
|
|
|
{
|
2021-03-10 01:41:31 +00:00
|
|
|
|
|
|
|
|
|
|
IOptions<LocalizationOptions> localOptions = Activator.CreateInstance<IOptions<LocalizationOptions>>();
|
2018-08-01 06:12:42 +02:00
|
|
|
|
ResourceManagerStringLocalizerFactory strFact = new ResourceManagerStringLocalizerFactory(applicationEnvironment, localOptions);
|
|
|
|
|
|
IStringLocalizer stringLocalizer = strFact.Create(typeof(NotWorking));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|