diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-05-13 11:40:45 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-05-13 12:35:15 -0500 |
| commit | 031991f32f059b64374e6d257cbe573304dd577f (patch) | |
| tree | 9d11ebb5d8595bf45c507f38d637b14915af7630 /src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs | |
| parent | ad6d2636f60b04ee68656f99fb3bd56a86ba5983 (diff) | |
| download | wix-031991f32f059b64374e6d257cbe573304dd577f.tar.gz wix-031991f32f059b64374e6d257cbe573304dd577f.tar.bz2 wix-031991f32f059b64374e6d257cbe573304dd577f.zip | |
Add ability to skip tests at runtime, and skip long running cache tests
6665
Diffstat (limited to '')
| -rw-r--r-- | src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs (renamed from src/internal/WixBuildTools.TestSupport/WixAssert.cs) | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/internal/WixBuildTools.TestSupport/WixAssert.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs index 1db842c3..10156547 100644 --- a/src/internal/WixBuildTools.TestSupport/WixAssert.cs +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs | |||
| @@ -6,6 +6,7 @@ namespace WixBuildTools.TestSupport | |||
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.Linq; | 7 | using System.Linq; |
| 8 | using System.Xml.Linq; | 8 | using System.Xml.Linq; |
| 9 | using WixBuildTools.TestSupport.XunitExtensions; | ||
| 9 | using Xunit; | 10 | using Xunit; |
| 10 | 11 | ||
| 11 | public class WixAssert : Assert | 12 | public class WixAssert : Assert |
| @@ -41,6 +42,16 @@ namespace WixBuildTools.TestSupport | |||
| 41 | CompareXml(expectedDoc, actualDoc); | 42 | CompareXml(expectedDoc, actualDoc); |
| 42 | } | 43 | } |
| 43 | 44 | ||
| 45 | /// <summary> | ||
| 46 | /// Dynamically skips the test. | ||
| 47 | /// Requires that the test was marked with a fact attribute derived from <see cref="WixBuildTools.TestSupport.XunitExtensions.SkippableFactAttribute" /> | ||
| 48 | /// or <see cref="WixBuildTools.TestSupport.XunitExtensions.SkippableTheoryAttribute" /> | ||
| 49 | /// </summary> | ||
| 50 | public static void Skip(string message) | ||
| 51 | { | ||
| 52 | throw new SkipTestException(message); | ||
| 53 | } | ||
| 54 | |||
| 44 | public static void Succeeded(int hr, string format, params object[] formatArgs) | 55 | public static void Succeeded(int hr, string format, params object[] formatArgs) |
| 45 | { | 56 | { |
| 46 | if (0 > hr) | 57 | if (0 > hr) |
