diff options
Diffstat (limited to 'src/internal/WixBuildTools.TestSupport/XunitExtensions')
| -rw-r--r-- | src/internal/WixBuildTools.TestSupport/XunitExtensions/SpecificReturnCodeException.cs | 9 | ||||
| -rw-r--r-- | src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SpecificReturnCodeException.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SpecificReturnCodeException.cs index c66890f8..c703e90a 100644 --- a/src/internal/WixBuildTools.TestSupport/XunitExtensions/SpecificReturnCodeException.cs +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/SpecificReturnCodeException.cs | |||
| @@ -7,11 +7,12 @@ namespace WixBuildTools.TestSupport | |||
| 7 | 7 | ||
| 8 | public class SpecificReturnCodeException : XunitException | 8 | public class SpecificReturnCodeException : XunitException |
| 9 | { | 9 | { |
| 10 | public SpecificReturnCodeException(int hr, string userMessage) | 10 | public SpecificReturnCodeException(int hrExpected, int hr, string userMessage) |
| 11 | : base(String.Format("WixAssert.SpecificReturnCode() Failure\r\n" + | 11 | : base(String.Format("WixAssert.SpecificReturnCode() Failure\r\n" + |
| 12 | "HRESULT: 0x{0:X8}\r\n" + | 12 | "Expected HRESULT: 0x{0:X8}\r\n" + |
| 13 | "Message: {1}", | 13 | "Actual HRESULT: 0x{1:X8}\r\n" + |
| 14 | hr, userMessage)) | 14 | "Message: {2}", |
| 15 | hrExpected, hr, userMessage)) | ||
| 15 | { | 16 | { |
| 16 | this.HResult = hr; | 17 | this.HResult = hr; |
| 17 | } | 18 | } |
diff --git a/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs b/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs index d8d02746..a8513bfb 100644 --- a/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs +++ b/src/internal/WixBuildTools.TestSupport/XunitExtensions/WixAssert.cs | |||
| @@ -58,7 +58,7 @@ namespace WixBuildTools.TestSupport | |||
| 58 | { | 58 | { |
| 59 | if (hrExpected != hr) | 59 | if (hrExpected != hr) |
| 60 | { | 60 | { |
| 61 | throw new SpecificReturnCodeException(hr, String.Format(format, formatArgs)); | 61 | throw new SpecificReturnCodeException(hrExpected, hr, String.Format(format, formatArgs)); |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | 64 | ||
