.NET Core has been in production (RTM) since June 2016, when it was officially released at the Red Had Summit by Scott Hanselman. What a glorious moment! Announcing an open source framework at a conference for Linux! Who would have thought that this would be possible some years ago? .NET Core 3.1 is the current (LTS) version but I'm also really looking forward to .NET 5, the one that unifies all .NET frameworks and becomes the next best version of .NET. You can download .NET 5 and take it for a spin today! Unit testing your apps is an …[read more]
Showing all posts tagged: 'unit test'
A 3-post collection
Spending my days writing lots of unit tests lately...You know the drill. For most of my tests, I like to use Moq, the .NET mocking library that allows you to mock objects and services. It's one of the best libraries for complementing and supporting unit tests. So today, I came across the Mock.Of<T>(). When creating a mock, we tend to use the following syntax: var mockService = new Mock<ISomeService>(); And then we setup the mock with the appropriate property values and methods in order to use it in our unit tests. So, in …[read more]