예제 #1
0
        public void ReadGZipFormat()
        {
            var dict = new NSDictionary();

            dict.Add("Version", 1);
            dict.Add("UncompressedSize", 14);

            var metadata = new XipMetadata();

            metadata.ReadFrom(dict);
            Assert.Null(metadata.FileSystemCompressionFormat);
            Assert.Equal(1, metadata.Version);
            Assert.Equal(14, metadata.UncompressedSize);
        }
예제 #2
0
        public void ReadBpxzFormat()
        {
            var dict = new NSDictionary();

            dict.Add("Version", 1);
            dict.Add("UncompressedSize", 0x00000007a33b8228);
            dict.Add("FileSystemCompressionFormat", "10.10");

            var metadata = new XipMetadata();

            metadata.ReadFrom(dict);
            Assert.Equal("10.10", metadata.FileSystemCompressionFormat);
            Assert.Equal(1, metadata.Version);
            Assert.Equal(0x00000007a33b8228, metadata.UncompressedSize);
        }
예제 #3
0
        public void ReadFrom_ValidatesArguments()
        {
            var metadata = new XipMetadata();

            Assert.Throws <ArgumentNullException>(() => metadata.ReadFrom(null));
        }