Пример #1
0
        public async Task ImportExamplePackages()
        {
            var importer = server.Host.Services.GetRequiredService <PackageImporter>();

            using (var ms = new MemoryStream()) {
                var writer = new StreamWriter(ms, Encoding.UTF8);
                await importer.ImportAsync(TestResources.GetE2eInputDirectory(), writer);

                await writer.FlushAsync();

                string text = Encoding.UTF8.GetString(ms.ToArray());
                Assert.Contains("liget-test1.1.0.0.nupkg Success", text);
                Assert.Contains("liget-two.1.0.0.nupkg Success", text);
                Assert.Contains("liget-two.2.1.0.nupkg Success", text);
            }
        }