public void File_to_sign_is_required() { var fixture = new SignMageFixture("mage.exe") { Settings = new SignSettings() }; Should.Throw <ArgumentNullException>(() => fixture.Run()); }
public void Shoud_call_mage_with_to_file_if_specified() { var fixture = new SignMageFixture("mage.exe") { Settings = new SignSettings("./example.application") { ToFile = "./other-example.application" } }; fixture.Run().Args.ShouldBe("-sign \"/Working/example.application\" -toFile \"/Working/other-example.application\""); }
public void Should_call_mage_with_certFile_without_a_password() { var fixture = new SignMageFixture("mage.exe") { Settings = new SignSettings("./example.application") { CertFile = "./file.pfx" } }; fixture.Run().Args.ShouldBe("-sign \"/Working/example.application\" -certFile \"/Working/file.pfx\""); }
public void Should_call_mage_with_certHash_if_specified() { var fixture = new SignMageFixture("mage.exe") { Settings = new SignSettings("./example.application") { CertHash = "abcdefg" } }; fixture.Run().Args.ShouldBe("-sign \"/Working/example.application\" -certHash \"abcdefg\""); }
public void CertFile_must_be_specified_with_password() { var fixture = new SignMageFixture("mage.exe") { Settings = new SignSettings("example.application") { Password = "******" } }; Should.Throw <ArgumentException>(() => fixture.Run()); }
public void Should_call_mage_with_certFile_and_password_if_specified() { var fixture = new SignMageFixture("mage.exe") { Settings = new SignSettings("./example.application") { CertFile = "./file.pfx", Password = "******" } }; fixture.Run().Args.ShouldBe("-sign \"/Working/example.application\" -pwd \"P@ssw0rd\" -certFile \"/Working/file.pfx\""); }