Исходный код вики Moq
Версия 1.4 от Alexandr Fokin на 2023/01/13 15:17
Скрыть последних авторов
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | moq/moq4 |
2 | [[https:~~/~~/github.com/moq/moq4/tree/ecd540409>>https://github.com/moq/moq4/tree/ecd540409]] | ||
3 | [[https:~~/~~/www.nuget.org/packages/Moq/>>https://www.nuget.org/packages/Moq/]] | ||
![]() |
1.4 | 4 | |
5 | ---- | ||
6 | |||
7 | {{code language="C#"}} | ||
8 | var moq = new Mock<IReadInterface>(); | ||
9 | moq | ||
10 | .Setup(e => e.Method(It.IsAny<string>())) | ||
11 | .Returns( | ||
12 | ValueTask.FromResult( | ||
13 | new Result() | ||
14 | ) | ||
15 | ); | ||
16 | {{/code}} | ||
17 | |||
18 | |||
19 | ---- | ||
20 | |||
21 | Moq vs NSubstitute - Who is the winner? | ||
22 | [[https:~~/~~/dev.to/cloudx/moq-vs-nsubstitute-who-is-the-winner-40gi>>https://dev.to/cloudx/moq-vs-nsubstitute-who-is-the-winner-40gi]] |