Moq: Extension methods (here: LoggerExtensions.LogError) may not be used in setup / verification expressions.

Sometimes when we develop unit tests it’s convenient to check if the tested code wrote something to the log. Is it a good practice to assert that some particular message appeared in the logs? I think there are pros and cons. On the pros side, we can make general assertions like “no errors were written … Read more

Can Yubikey replace Authy?

One of the common ways to do two-factor Authentication is to use an authenticator app like Authy, Microsoft Authenticator, 1Password or LastPass Authenticator. Authy manages one-time passwords The common denominator of Authy and other apps mentioned above is that they generate time-based one-time passwords (TOTP). They are usually set up like in the screenshot below. … Read more

How to suppress issues in C# code

I like to maintain a zero-warning policy in a project. In the case of false-alarm warnings, I think it’s better to suppress them than to leave them active. When we suppress a warning, it will not draw our attention every time we look at logs. So, how can we suppress a warning like the example … Read more