1
1
moq
2
2
===
3
3
4
- The most popular and friendly mocking library for .NET
5
-
6
4
[ ![ Version] ( https://img.shields.io/nuget/vpre/Moq.svg )] ( https://www.nuget.org/packages/Moq )
7
5
[ ![ Downloads] ( https://img.shields.io/nuget/dt/Moq.svg )] ( https://www.nuget.org/packages/Moq )
8
6
[ ![ Documentation] ( https://img.shields.io/badge/docs-website-%23fc0 )] ( http://moq.github.io/moq4/ )
9
7
[ ![ Discord Chat] ( https://img.shields.io/badge/chat-on%20discord-7289DA.svg )] ( https://discord.gg/8PtpGdu )
10
8
9
+ <!-- #content -->
10
+ The most popular and friendly mocking library for .NET
11
+
11
12
``` csharp
12
13
var mock = new Mock <ILoveThisLibrary >();
13
14
@@ -25,7 +26,8 @@ The most popular and friendly mocking library for .NET
25
26
mock .Verify (library => library .DownloadExists (" 2.0.0.0" ), Times .AtMostOnce ());
26
27
```
27
28
28
- Moq also is the first and only library so far to provide Linq to Mocks, so that the same behavior above can be achieved much more succinctly:
29
+ Moq also is the first and only library so far to provide Linq to Mocks, so that the
30
+ same behavior above can be achieved much more succinctly:
29
31
30
32
``` csharp
31
33
ILoveThisLibrary lovable = Mock .Of <ILoveThisLibrary >(l =>
@@ -42,9 +44,12 @@ Moq also is the first and only library so far to provide Linq to Mocks, so that
42
44
Mock .Get (lovable ).Verify (library => library .DownloadExists (" 2.0.0.0" ));
43
45
```
44
46
45
- You can think of Linq to Mocks as "from the universe of mocks, give me one whose behavior matches this expression".
47
+ You can think of Linq to Mocks as "from the universe of mocks, give me one whose behavior
48
+ matches this expression".
49
+
50
+ Check out the [ Quickstart] ( https://github.com/moq/moq/wiki/Quickstart ) for more examples!
46
51
47
- Check out the [ Quickstart ] ( https://github.com/Moq/moq4/wiki/Quickstart ) for more examples!
52
+ <!-- #content -->
48
53
49
54
## What?
50
55
@@ -77,6 +82,8 @@ Moq was originally developed by [Clarius](http://www.clariusconsulting.net), [Ma
77
82
78
83
Moq uses [ Castle DynamicProxy] ( http://www.castleproject.org/projects/dynamicproxy/ ) internally as the interception mechanism to enable mocking.
79
84
85
+ <!-- #features -->
86
+
80
87
## Features at a glance
81
88
Moq offers the following features:
82
89
* Strong-typed: no strings for expectations, no object-typed return values or constraints
@@ -100,6 +107,9 @@ We appreciate deeply any feedback that you may have! Feel free to participate in
100
107
https://github.com/moq/moq4/issues
101
108
"Moq issue tracker on GitHub"
102
109
110
+ <!-- #features -->
111
+ <!-- #sponsors -->
112
+
103
113
![ Sponsors] ( https://raw.githubusercontent.com/devlooped/sponsors/main/assets/sponsors.svg ) Sponsors
104
114
============
105
115
@@ -110,21 +120,4 @@ Special thanks to the following gold sponsors of this project:
110
120
111
121
And to all our sponsors!
112
122
113
- <!-- include https://github.com/devlooped/sponsors/raw/main/sponsors.md -->
114
- [ ![ Clarius Org] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png " Clarius Org ")] ( https://github.com/clarius )
115
- [ ![ C. Augusto Proiete] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/augustoproiete.png " C. Augusto Proiete ")] ( https://github.com/augustoproiete )
116
- [ ![ Kirill Osenkov] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png " Kirill Osenkov ")] ( https://github.com/KirillOsenkov )
117
- [ ![ MFB Technologies, Inc.] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png " MFB Technologies, Inc. ")] ( https://github.com/MFB-Technologies-Inc )
118
- [ ![ SandRock] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sandrock.png " SandRock ")] ( https://github.com/sandrock )
119
- [ ![ Andy Gocke] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agocke.png " Andy Gocke ")] ( https://github.com/agocke )
120
- [ ![ Stephen Shaw] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/decriptor.png " Stephen Shaw ")] ( https://github.com/decriptor )
121
- [ ![ Torutek] ( https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png " Torutek ")] ( https://github.com/torutek-gh )
122
-
123
-
124
- <!-- https://github.com/devlooped/sponsors/raw/main/sponsors.md -->
125
- <br >
126
-
127
- [ ![ Sponsor this project] ( https://raw.githubusercontent.com/devlooped/sponsors/main/sponsor.png " Sponsor this project ")] ( https://github.com/sponsors/devlooped )
128
-   ;
129
-
130
- [ Learn more about GitHub Sponsors] ( https://github.com/sponsors )
123
+ <!-- include https://github.com/devlooped/sponsors/raw/main/sponsors.md -->
0 commit comments