Mocking Virtual and Abstract Methods and Properties Overview
Like interfaces, virtual and abstract methods are fundamental pillars of software design. Virtual methods typically have an implementation that can be overridden in a derived class. In comparison, an abstract method (or property) is simply a declaration of a method without an implementation, which must be provided in a derived class.
With JustMock, you can arrange the behavior of a virtual or abstract method or property in the same way you would arrange any other method.
Mock of an Abstract Method
Here is an example of how to mock an abstract method with JustMock: