diff options
Diffstat (limited to 'src/WixTestTools')
| -rw-r--r-- | src/WixTestTools/BundleInstaller.cs | 12 | ||||
| -rw-r--r-- | src/WixTestTools/BundleVerifier.cs | 14 | ||||
| -rw-r--r-- | src/WixTestTools/WixTestTools.csproj | 4 |
3 files changed, 28 insertions, 2 deletions
diff --git a/src/WixTestTools/BundleInstaller.cs b/src/WixTestTools/BundleInstaller.cs index 854c12f0..859656ad 100644 --- a/src/WixTestTools/BundleInstaller.cs +++ b/src/WixTestTools/BundleInstaller.cs | |||
| @@ -37,6 +37,18 @@ namespace WixTestTools | |||
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | /// <summary> | 39 | /// <summary> |
| 40 | /// Installs the bundle with optional arguments. | ||
| 41 | /// </summary> | ||
| 42 | /// <param name="bundlePath">This should be the bundle in the package cache.</param> | ||
| 43 | /// <param name="expectedExitCode">Expected exit code, defaults to success.</param> | ||
| 44 | /// <param name="arguments">Optional arguments to pass to the tool.</param> | ||
| 45 | /// <returns>Path to the generated log file.</returns> | ||
| 46 | public string Install(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) | ||
| 47 | { | ||
| 48 | return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Install, arguments, bundlePath: bundlePath); | ||
| 49 | } | ||
| 50 | |||
| 51 | /// <summary> | ||
| 40 | /// Modify the bundle with optional arguments. | 52 | /// Modify the bundle with optional arguments. |
| 41 | /// </summary> | 53 | /// </summary> |
| 42 | /// <param name="expectedExitCode">Expected exit code, defaults to success.</param> | 54 | /// <param name="expectedExitCode">Expected exit code, defaults to success.</param> |
diff --git a/src/WixTestTools/BundleVerifier.cs b/src/WixTestTools/BundleVerifier.cs index 433b6a0a..293da560 100644 --- a/src/WixTestTools/BundleVerifier.cs +++ b/src/WixTestTools/BundleVerifier.cs | |||
| @@ -56,6 +56,20 @@ namespace WixTestTools | |||
| 56 | return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); | 56 | return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | public string ManuallyCache() | ||
| 60 | { | ||
| 61 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | ||
| 62 | Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); | ||
| 63 | File.Copy(this.Bundle, expectedCachePath); | ||
| 64 | return expectedCachePath; | ||
| 65 | } | ||
| 66 | |||
| 67 | public void ManuallyUncache() | ||
| 68 | { | ||
| 69 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | ||
| 70 | File.Delete(expectedCachePath); | ||
| 71 | } | ||
| 72 | |||
| 59 | public bool TryGetRegistration(out BundleRegistration registration) | 73 | public bool TryGetRegistration(out BundleRegistration registration) |
| 60 | { | 74 | { |
| 61 | var bundleSymbol = this.GetBundleSymbol(); | 75 | var bundleSymbol = this.GetBundleSymbol(); |
diff --git a/src/WixTestTools/WixTestTools.csproj b/src/WixTestTools/WixTestTools.csproj index 0c3c4c76..38b2cb35 100644 --- a/src/WixTestTools/WixTestTools.csproj +++ b/src/WixTestTools/WixTestTools.csproj | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" /> | 11 | <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" /> |
| 12 | <PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" /> | 12 | <PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" /> |
| 13 | <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.48" /> | 13 | <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.48" /> |
| 14 | <PackageReference Include="WixToolset.Data" Version="4.0.198" /> | 14 | <PackageReference Include="WixToolset.Data" Version="4.0.199" /> |
| 15 | <PackageReference Include="WixToolset.Mba.Core" Version="4.0.51" /> | 15 | <PackageReference Include="WixToolset.Mba.Core" Version="4.0.52" /> |
| 16 | </ItemGroup> | 16 | </ItemGroup> |
| 17 | 17 | ||
| 18 | <ItemGroup> | 18 | <ItemGroup> |
