public void Uncompress_Should_Throw_If_FilePath_Is_Null() { // Given var fileSystem = Substitute.For <IFileSystem>(); var environment = Substitute.For <ICakeEnvironment>(); var log = Substitute.For <ICakeLog>(); var zip = new BZip2(fileSystem, environment, log); // Then Assert.That(() => zip.Uncompress(null, "/Uncompress"), Throws.InstanceOf <ArgumentNullException>() .And.Property("ParamName").EqualTo("filePath")); }
public void Uncompress_Should_Throw_If_OutputPath_Is_Null() { // Given var filePath = "/archive.tar.bz2"; var environment = FakeEnvironment.CreateUnixEnvironment(); var fileSystem = new FakeFileSystem(environment); fileSystem.CreateFile(filePath); var log = Substitute.For <ICakeLog>(); var zip = new BZip2(fileSystem, environment, log); // Then Assert.That(() => zip.Uncompress(filePath, null), Throws.InstanceOf <ArgumentNullException>() .And.Property("ParamName").EqualTo("outputPath")); }