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); }
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); }
public void ReadFrom_ValidatesArguments() { var metadata = new XipMetadata(); Assert.Throws <ArgumentNullException>(() => metadata.ReadFrom(null)); }