예제 #1
0
        public void CreateArchive_HappyPath()
        {
            var expecteds = new List <string> {
                "a", "b"
            };

            var zipFileName = Path.Combine(_testRoot, "a.zip");

            using (var wa = _sut.CreateArchive(zipFileName))
            {
                foreach (var c in expecteds)
                {
                    wa.Add(c);
                }
            }

            Assert.True(File.Exists(zipFileName));
            var actuals = new ReadingArchive(zipFileName).GetAll <string>();

            CollectionAssert.AreEquivalent(expecteds, actuals);
        }