Set up properties of EmailMessage – Updated
The post demonstrates how to update EmailMessage properties that don’t have public setters.… Read More Set up properties of EmailMessage – Updated
The post demonstrates how to update EmailMessage properties that don’t have public setters.… Read More Set up properties of EmailMessage – Updated
The post is devoted to the writing unit tests for classes which use static properties or shared resources.… Read More Testing shared resources with xUnit and Moq
Стаття демонструє як створювати макети та тестувати методи із ref/out параметрами.… Read More Макет метода з out параметром за допомогою Moq
The post shows how to mock and to test methods with out parameters.… Read More Moq and out parameter
Let’s write thread-safe class with two properties: – logical property “State” describes state of the object; – numeric property “Count” counts how many relative objects including current one has TRUE state. First approach gives us the following class: Full code is accessible on GitHub Blog repository. This class is not thread-safe that could be easily… Read More Simple thread-safe class
Recently, I wrote Xunit tests for business object that requires to catch exceptions generated by wrong property values in synchronous and asynchronous calls. This post includes several examples and full code is accessible on GitHub Blog repository. Here I will use approach described in Richard Banks’ post Stop Using Assert.Throws in Your BDD Unit Tests… Read More Xunit and exceptions with async Task