You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<sup><ahref='/src/Verify.Tests/CombinationSample.cs#L18-L34'title='Snippet source file'>snippet source</a> | <ahref='#snippet-CombinationSample'title='Start of snippet'>anchor</a></sup>
@@ -94,19 +96,19 @@ To enable exception capture use `captureExceptions = true`:
94
96
[Fact]
95
97
publicTaskBuildAddressExceptionsTest()
96
98
{
97
-
int[] streetNumbers= [-1, 0, 10];
98
-
string[] streets= ["", "", "Valid St"];
99
-
string[] cities= [null!, "Valid City"];
99
+
int[] number= [-1, 0, 10];
100
+
string[] street= ["", "", "Valid St"];
101
+
string[] city= [null!, "Valid City"];
100
102
returnCombination(captureExceptions: true)
101
103
.Verify(
102
104
BuildAddress,
103
-
streetNumbers,
104
-
streets,
105
-
cities
105
+
number,
106
+
street,
107
+
city
106
108
);
107
109
}
108
110
```
109
-
<sup><ahref='/src/Verify.Tests/CombinationSample.cs#L54-L71'title='Snippet source file'>snippet source</a> | <ahref='#snippet-CombinationSample_CaptureExceptions'title='Start of snippet'>anchor</a></sup>
111
+
<sup><ahref='/src/Verify.Tests/CombinationSample.cs#L92-L109'title='Snippet source file'>snippet source</a> | <ahref='#snippet-CombinationSample_CaptureExceptions'title='Start of snippet'>anchor</a></sup>
110
112
<!-- endSnippet -->
111
113
112
114
@@ -121,13 +123,13 @@ public Task BuildAddressExceptionsTest()
121
123
-1, , null : ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
122
124
-1, , Valid City: ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
123
125
-1, Valid St, null : ArgumentNullException: Value cannot be null. (Parameter 'city').,
124
-
-1, Valid St, Valid City: ArgumentOutOfRangeException: streetNumber ('-1') must be greater than or equal to '1'. (Parameter 'streetNumber'). Actual value was -1.,
126
+
-1, Valid St, Valid City: ArgumentOutOfRangeException: number ('-1') must be greater than or equal to '1'. (Parameter 'number'). Actual value was -1.,
125
127
0, , null : ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
126
128
0, , Valid City: ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
127
129
0, , null : ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
128
130
0, , Valid City: ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
129
131
0, Valid St, null : ArgumentNullException: Value cannot be null. (Parameter 'city').,
130
-
0, Valid St, Valid City: ArgumentOutOfRangeException: streetNumber ('0') must be greater than or equal to '1'. (Parameter 'streetNumber'). Actual value was 0.,
132
+
0, Valid St, Valid City: ArgumentOutOfRangeException: number ('0') must be greater than or equal to '1'. (Parameter 'number'). Actual value was 0.,
131
133
10, , null : ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
132
134
10, , Valid City: ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
133
135
10, , null : ArgumentException: The value cannot be an empty string or composed entirely of whitespace. (Parameter 'street').,
@@ -148,7 +150,7 @@ Exception capture can be enabled globally:
148
150
<aid='snippet-GlobalCaptureExceptions'></a>
149
151
```cs
150
152
[ModuleInitializer]
151
-
publicstaticvoidInitialize() =>
153
+
publicstaticvoidEnableCaptureExceptions() =>
152
154
CombinationSettings.CaptureExceptions();
153
155
```
154
156
<sup><ahref='/src/StaticSettingsTests/CombinationTests.cs#L3-L9'title='Snippet source file'>snippet source</a> | <ahref='#snippet-GlobalCaptureExceptions'title='Start of snippet'>anchor</a></sup>
@@ -162,15 +164,15 @@ If exception capture has been enabled globally, it can be disable at the method
162
164
[Fact]
163
165
publicTaskBuildAddressExceptionsDisabledTest()
164
166
{
165
-
int[] streetNumbers= [1, 10];
166
-
string[] streets= ["Smith St", "Wallace St"];
167
-
string[] cities= ["Sydney", "Chicago"];
167
+
int[] number= [1, 10];
168
+
string[] street= ["Smith St", "Wallace St"];
169
+
string[] city= ["Sydney", "Chicago"];
168
170
returnCombination(captureExceptions: false)
169
171
.Verify(
170
172
BuildAddress,
171
-
streetNumbers,
172
-
streets,
173
-
cities);
173
+
number,
174
+
street,
175
+
city);
174
176
}
175
177
```
176
178
<sup><ahref='/src/StaticSettingsTests/CombinationTests.cs#L177-L193'title='Snippet source file'>snippet source</a> | <ahref='#snippet-CombinationSample_CaptureExceptionsFalse'title='Start of snippet'>anchor</a></sup>
@@ -201,7 +203,16 @@ public class CombinationResultsConverter :
0 commit comments