diff options
author | Bob Arnson <bob@firegiant.com> | 2025-02-14 22:29:39 -0500 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2025-03-03 14:25:07 -0500 |
commit | ca6e44d496b0c589fdaabad69a00643f539c47cd (patch) | |
tree | edf84727cecfc03092a2851b465d97622c5048eb /src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs | |
parent | ba7fd5837ea149b2e319cc577fad27ce1162a064 (diff) | |
download | wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.gz wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.tar.bz2 wix-ca6e44d496b0c589fdaabad69a00643f539c47cd.zip |
Convert ext\ to MSTest and traversal projects.
- Move ext\ unit tests to MSTest.
- MSBuildify ext projects with MSTest execution.
- Fork test support projects for MSTest:
- WixInternal.TestSupport
- WixInternal.Core.TestPackage
Diffstat (limited to 'src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs')
-rw-r--r-- | src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs b/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs index 5ac28de1..131d4e83 100644 --- a/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs +++ b/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs | |||
@@ -105,6 +105,32 @@ namespace WixInternal.TestSupport | |||
105 | Assert.NotEqual<object>(expected, actual, comparer); | 105 | Assert.NotEqual<object>(expected, actual, comparer); |
106 | } | 106 | } |
107 | 107 | ||
108 | public static void Single(IEnumerable<string> collection) | ||
109 | { | ||
110 | Assert.Single(collection); | ||
111 | // TODO: MSTEST: Assert.Equal(1, collection.Count()); | ||
112 | } | ||
113 | |||
114 | public static void Single(IEnumerable<string> collection, Func<string, bool> predicate) | ||
115 | { | ||
116 | var results = collection.Where(predicate); | ||
117 | Assert.Single(results); | ||
118 | // TODO: MSTEST: Assert.Equal(1, results.Count()); | ||
119 | } | ||
120 | |||
121 | public static void Empty(IEnumerable<string> collection) | ||
122 | { | ||
123 | Assert.Empty(collection); | ||
124 | // TODO: MSTEST: Assert.Equal(0, collection.Count()); | ||
125 | } | ||
126 | |||
127 | public static void Empty(IEnumerable<string> collection, Func<string, bool> predicate) | ||
128 | { | ||
129 | var results = collection.Where(predicate); | ||
130 | Assert.Empty(results); | ||
131 | // TODO: MSTEST: Assert.Equal(0, results.Count()); | ||
132 | } | ||
133 | |||
108 | // There appears to have been a bug in VC++, which might or might not have been partially | 134 | // There appears to have been a bug in VC++, which might or might not have been partially |
109 | // or completely corrected. It was unable to disambiguate a call to: | 135 | // or completely corrected. It was unable to disambiguate a call to: |
110 | // Xunit::Assert::Throws(System::Type^, System::Action^) | 136 | // Xunit::Assert::Throws(System::Type^, System::Action^) |