diff options
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^) |