public int Compress() { using (var inputStream = File.OpenRead(InputFile)) using (var outputStream = File.Open(TargetFile, FileMode.OpenOrCreate, FileAccess.ReadWrite)) { var(ratio, _) = streamCompressor.Compress(inputStream, outputStream); return(ratio); } }
public void Should_fail_when_given_null_input_stream() { Action action = () => streamCompressor.Compress(null, new MemoryStream()); action.Should().Throw <ArgumentNullException>(); }