dotnetomaniak.pl - Artykuły z tagiem mocki

Reading time ~3 minutes I’ve seen multiple people struggling with trying to mock the ILogger calls. This post will hopefully save some people from wandering this path. Here it goes:Please stop trying to mock the ILogger methods from .net core. Here is why: Most ILogger methods that we use for logging are extension methods - static methods. While mocking them is possible using Prig, or Microsoft Fakes it is not easy or pleasant. Mocking a static method boils down to replacing the code at runtime using...

Dziel się z innymi:
Stop trying to mock the ILogger methods – IndexOutOfRange

Sztuka programowania 126 dni, 17 godzin, 41 minut temu maklipsa 127 źrodło rozwiń

DAC2019baner
Sklep z gadzetami

Najaktywniejsi

1
(32 891,59)
2
(32 816,53)
3
(27 178,29)
4
(21 178,88)
5
(20 336,33)
6
(13 018,14)
7
(10 512,28)
8
(9 775,28)
9
(8 388,27)
10
(6 822,96)
11
(6 214,22)
12
(5 393,84)
13
(4 127,41)
14
(4 026,73)
15
(3 863,06)
16
(3 599,54)
17
(3 448,35)
18
(3 318,39)
19
(3 224,66)
20
(3 105,41)