Mocking a class dependency which casts into a derived type using Moq

Let’s say we have the following, one class named Implementor which has an IParentInterface dependency.

In method DoWork of the class, we call the interface’s method, but we also call another method, which comes by casting the dependency to a derived interface.
All, good, we go ahead and create a unit test project, adding the Moq package as well, in order to mock dependencies.

Continue reading

Angular2 from Scratch – Getting to know Angular2

In this post, we are going to focus on some pretty basic stuff, like setting up the application and getting it working. Posts will become more advanced during the series progress. Feedback is always appreciated, so please, if you have any thoughts on how this and future posts can be improved, leave your comments below.

Who is this article for

If you are a beginner on Angular2, if the framework is something new for you and you wish to learn more about it, this is the article for you. We are going to setup Angular2 with TypeScript on VSCode, getting a very basic hello world application.

Continue reading