public void Should_Throw_If_InnoSetup_Runner_Was_Not_Found() { // Given var fixture = new InnoSetupFixture(); fixture.GivenDefaultToolDoNotExist(); // When var result = Record.Exception(() => fixture.Run()); // Then Assert.IsType <CakeException>(result); Assert.Equal("InnoSetup: Could not locate executable.", result?.Message); }
public void Should_Find_InnoSetup_Runner_In_Installation_Path_If_Tool_Path_Not_Provided_x64() { // Given var fixture = new InnoSetupFixture(); fixture.GivenDefaultToolDoNotExist(); fixture.GivenToolIsInstalledX64(); // When var result = fixture.Run(); // Then Assert.Equal(fixture.InstalledToolPath.FullPath, result.Path.FullPath); }
public void Should_Use_Newest_InnoSetup_Version_If_Version_And_Tool_Path_Are_Not_Provided(bool is64Bit) { // Given var fixture = new InnoSetupFixture(); fixture.GivenDefaultToolDoNotExist(); fixture.GivenToolIsInstalled(is64Bit, InnoSetupVersion.InnoSetup5); fixture.GivenToolIsInstalled(is64Bit, InnoSetupVersion.InnoSetup6); // When var result = fixture.Run(); // Then Assert.Equal(fixture.InstalledToolPaths[InnoSetupVersion.InnoSetup6].FullPath, result.Path.FullPath); }
public void Should_Use_Provided_InnoSetup_Version_When_Tool_Path_Is_Not_Provided(bool is64Bit, InnoSetupVersion version) { // Given var fixture = new InnoSetupFixture(); fixture.GivenDefaultToolDoNotExist(); fixture.GivenToolIsInstalled(is64Bit, InnoSetupVersion.InnoSetup5); fixture.GivenToolIsInstalled(is64Bit, InnoSetupVersion.InnoSetup6); fixture.Settings.Version = version; // When var result = fixture.Run(); // Then Assert.Equal(fixture.InstalledToolPaths[version].FullPath, result.Path.FullPath); }