show line numbers in conde snippets

This commit is contained in:
Marcello 2023-10-20 18:22:46 +02:00
parent cd1df0e376
commit 255a68d673
82 changed files with 1249 additions and 1251 deletions

View file

@ -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());
```
```