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
Copy file name to clipboardExpand all lines: basic-usage/matchers.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,16 +115,16 @@ With the first line we specify that when the __foo.Echo__ method is called with
115
115
{{endregion}}
116
116
117
117
118
-
On the second line we specify the __RangeKind__ to be __Exclusive__ so calling the method with 6 or 10 doesn’t satisfy the condition because these values are excluded from the range.
118
+
On the second line we specify the __RangeKind__ to be __Exclusive__ so calling the method with 0 or 5 doesn’t satisfy the condition because these values are excluded from the range.
This is the most flexible matcher and it allows you to specify your own matching expression. Let's illustrate it with a simple example:
123
123
124
124
#### __[C#]__
125
125
126
126
{{region Matchers##ArgMatchesCS}}
127
-
Mock.Arrange(() => foo.Echo(Arg.Matches<int>( x => x < 10)).Returns(true);
127
+
Mock.Arrange(() => foo.Echo(Arg.Matches<int>( x => x < 10))).Returns(true);
128
128
{{endregion}}
129
129
130
130
#### __[VB]__
@@ -356,7 +356,7 @@ In the case when a specialization is used among with `Arg.IsAny<T>`, JustMock wi
356
356
357
357
## Using Matchers for ref Arguments (Arg.Ref())
358
358
359
-
> __`Arg.Ref`is used only in C# assemblies, as for Visual Basic you can directly match `ByRef` arguments without it.__
359
+
> __The use of `Arg.Ref`in Visual Basic is optional, as you can directly match `ByRef` arguments without it.__
360
360
361
361
With JustMock you are able to use matchers for functions that take ref arguments. For this purpose, you need to use the `Arg.Ref().Value` syntax. Check the next examples for further guidance:
362
362
@@ -394,7 +394,7 @@ With JustMock you are able to use matchers for functions that take ref arguments
0 commit comments