Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/ICSharpCode.SharpZipLib/Zip/ZipEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -724,17 +724,13 @@ public long Crc
/// <summary>
/// Gets/Sets the compression method.
/// </summary>
/// <remarks>Throws exception when set if the method is not valid as per <see cref="IsCompressionMethodSupported()"/></remarks>
/// <exception cref="NotSupportedException"/>
/// <returns>
/// The compression method for this entry
/// </returns>
public CompressionMethod CompressionMethod
{
get => method;
set => method = !IsCompressionMethodSupported(value)
? throw new NotSupportedException("Compression method not supported")
: value;
set => method = value;
}

/// <summary>
Expand Down
12 changes: 0 additions & 12 deletions test/ICSharpCode.SharpZipLib.Tests/Zip/GeneralHandling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ private string DescribeAttributes(FieldAttributes attributes)
return att;
}

[Test]
[Category("Zip")]
//[ExpectedException(typeof(NotSupportedException))]
public void UnsupportedCompressionMethod()
{
var ze = new ZipEntry("HumblePie");
//ze.CompressionMethod = CompressionMethod.BZip2;

Assert.That(() => ze.CompressionMethod = CompressionMethod.Deflate64,
Throws.TypeOf<NotSupportedException>());
}

/// <summary>
/// Invalid passwords should be detected early if possible, seekable stream
/// </summary>
Expand Down