mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-06-09 03:07:13 +00:00
show line numbers in conde snippets
This commit is contained in:
parent
cd1df0e376
commit
255a68d673
82 changed files with 1249 additions and 1251 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
## xUnit
|
||||
|
||||
```cs
|
||||
```cs linenums="1"
|
||||
using System;
|
||||
using Xunit;
|
||||
|
||||
|
@ -37,7 +37,7 @@ For context cleanup, add the `IDisposable` interface to the test class, and put
|
|||
|
||||
## Mocking with Moq
|
||||
|
||||
```cs
|
||||
```cs linenums="1"
|
||||
var mockObj = new Mock<MockedType>();
|
||||
|
||||
mockObj.Setup(m => m.Method(It.IsAny<InputType>())).Returns(value);
|
||||
|
@ -48,4 +48,4 @@ mockObj.Verify(m => m.Method(It.IsAny<InputType>()), Times.Once());
|
|||
|
||||
// check that the invocation is forwarded to the mock with a specific input
|
||||
mockObj.Verify(m => m.Method(input), Times.Once());
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue