SOLID Principles: Interface Segregation Principle (ISP)

In this part of the SOLID series, we're going to revisit the ISP or Interface Segregation Principle. Yep, this is a very long article. If you want an easier way of learning SOLID principles in depth, then I would recommend you taking my SOLID tutorial just for 10.99$. Interface Segregation Principle Definition Before giving a definition, I want to [...]

By |2019-01-11T11:11:55+03:00December 27th, 2018|.NET, Best Practices, C#, CodeProject, Design|34 Comments

SOLID Principles: Liskov Substitution Principle (LSP) In Practice

LSP Definition The official definition from Barbara Liskov sounds like this: “If S is a subtype of T, then objects of type T may be replaced with objects of type S, without breaking the program” – B. Liskov. It’s not very hard to grasp what this definition means but I’ll quote the definition of LSP from the book of Uncle Bob “Agile Principles, [...]

By |2019-01-11T11:12:07+03:00December 26th, 2018|.NET, Best Practices, C#, CodeProject, Design|1 Comment

Introduction to Selenium

What is Selenium Selenium is a portable software testing framework for web applications. Basically, it automates browsers what in other words means that it simulates how human beings interact with browsers, e.g. click on buttons, select check boxes, type in some text and so on. There are two major ways of using the power of Selenium: Selenium IDE – There is Selenium IDE which, [...]

By |2019-01-11T11:12:31+03:00October 30th, 2018|.NET, C#, CodeProject, Testing|1 Comment

Writing the First Acceptance Test with SpecFlow

To write acceptance tests using SpecFlow, we need to properly set up the environment and a testing project. At first, we need to install a SpecFlow extension for Visual Studio. We need it because SpecFlow integrates into Visual Studio allowing us to easily format features and scenarios, generate corresponding code and other things. The installation process is straightforward. The only thing is that it will require [...]

By |2019-01-11T11:12:43+03:00October 22nd, 2018|.NET, CodeProject, Testing|0 Comments

Acceptance and UI Testing with SpecFlow and Selenium

Pyramid of Tests Basically, tests can be divided into three major groups: unit tests integration tests acceptance tests Unit tests are those tests which verify the behavior of a unit under test in isolation. That’s why when a unit under test has dependencies, we often mock them or in other words replace by special test doubles. Unit tests are great, and the majority [...]

By |2019-01-11T11:12:53+03:00October 22nd, 2018|.NET, CodeProject, Testing|0 Comments

SOLID Principles: The Open/Closed Principle (OCP)

The second principle we’re going to talk about is the Open/Closed Principle. If we look at Wikipedia, we will see the following definition: The Open/Closed Principle states that software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. Problem Statement What it means, in essence, is that when we need to introduce a change, we shouldn’t dig deep into [...]

By |2019-01-11T11:13:14+03:00September 4th, 2017|.NET, C#, CodeProject, Design|0 Comments

SOLID Principles: Single Responsibility Principle (SRP)

This entry is part 3 of 6 in the series SOLID

SRP Definition In this article, we will look at what is single responsibility principle and look at some simple examples in C# which demonstrate the single responsibility principle and how to adhere to the SRP. Single Responsibility Principles or SRP in short states that every object should have a single [...]

By |2019-01-11T11:13:24+03:00June 28th, 2017|.NET, Best Practices, C#, CodeProject, Design|1 Comment

Handling Errors and Exceptions in C#. Part 3

This is the third and most comprehensive part about handling errors and exceptions in C#. Here are the first and the second part. Also, you can take a look at the blog post about global exceptions handling in WPF applications. Errors Handling and many other topics you’ll find in my new video course “API in C#: The Best Practices of Design and Implementation”. Take [...]

By |2019-01-11T11:14:50+03:00October 24th, 2016|.NET, Best Practices, C#, CodeProject, Refactoring|7 Comments

Abstract Class VS Interface in C#

You can open any C# tutorial and you’ll find some information about abstract classes and interfaces. Most likely, you’ll not find any information about what is the difference between abstract class and interface. This theme was discussed earlier on the Internet several times but I want to consolidate all the most important thoughts regarding the problem of choosing between an abstract class and interface [...]

By |2019-01-11T11:11:11+03:00July 22nd, 2016|.NET, Best Practices, C#, CodeProject, Design|5 Comments
Go to Top