コード例 #1
0
        public async Task MakeTest()
        {
            using var tempDir       = new TempDir();
            using var contextHolder = TempContext.Create();
            var ctx = contextHolder.Object;

            var outputStream = new MemoryStream();

            var res = await Tar.Make(outputStream, ctx, new[] { tempDir.Path });

            var outputRes = outputStream.ToArray();

            using var zip = new ZipArchive(outputRes.ToStream(), ZipArchiveMode.Read);

            Assert.True(zip.Entries.Count == 4);
        }