예제 #1
0
        public void Load()
        {
            instance.Load();
            Assert.AreEqual(2, instance.Supported.Count());
            var lexicons = instance.Supported.OrderBy(item => item).ToArray();

            Assert.AreEqual("base", lexicons[0]);
            Assert.AreEqual("other", lexicons[1]);
        }
예제 #2
0
        public void Load()
        {
            var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "Data", "Lexicons");

            instance.Load(path);
            Assert.AreEqual(2, instance.Supported.Count());
            var lexicons = instance.Supported.OrderBy(item => item).ToArray();

            Assert.AreEqual("base", lexicons[0]);
            Assert.AreEqual("other", lexicons[1]);
        }
        public async Task InitializeAsync()
        {
            logger.LogDebug("Initialise");
            await lexiconDownloader.Download(item => item.Model, environment.ContentRootPath)
            .ConfigureAwait(false);

            await lexiconDownloader.Download(item => item.Lexicons, environment.ContentRootPath, true)
            .ConfigureAwait(false);

            loader.Load();

            using (var scope = provider.CreateScope())
            {
                var container = scope.ServiceProvider.GetService <ISessionContainer>();
                var client    = container.GetTesting(null);
                client.Init();
            }
        }