Stub vs Mock
In automated testing, there are numerous scenarios where we cannot properly test the System Under Test (SUT) due to dependencies on components that are unavailable, return values not useful for the test or when we simply desire more control over them. In these situations, we can use test doubles. A test double…
Test Driven Development
Test-Driven Development (TDD) is a programming technique that inverts the traditional order of software development. It consists of three main stages: Red, Green, and Refactor. In the initial Red stage, a test is created that does not pass because the corresponding functionality has not been implemented yet. This is why…
SOLID Principles
SOLID represents a set of principles employed in Object-Oriented programming. These principles helps in creating projects that are easy to maintain, enhance readability and promote extensibility within the program. Introduced by Computer Scientist Robert C. Martin, SOLID is an acronym of five rules, which are detailed in the subsequent…
Decorator
The Decorator pattern is a member of the structural design patterns. It allows dynamic addition of new functionalities to objects at runtime by encapsulating the base object within specialized objects called decorators. Decorators extend behavior of the base object without changing its structure. Through the use of composition, each decorator…
Observer
The Observer is one of the behavioral design patterns. It establishes a subscription mechanism where one or more objects, known as Observers, monitor changes in another object called the Subject. When the Subject’s state changes, it notifies all registered Observers. The Observers can react in different ways for the same…
Abstract Factory
The Abstract Factory is one of the creational design patterns. It provides an interface for creating families of related objects without specifying their concrete classes. This pattern is especially useful when the code needs to work with different families of objects and cannot depend on the their concrete classes…





