Skip to content Skip to sidebar Skip to footer

Technology

Unit Testing in C# Part 05: Building Out the Class 3

In this blog we will continue testing our Scorer class by adding Spares and Strikes. Adding Spares Looking at the rules for spares. If we knock down 10 pins with 2 bowls, we add 10 plus the value of the next bowl. Here is our failing test. [Test] public void CalculateScoreWithSpares() { …

__trashed 4

The idea of this post is to document my journey to building PostgreSQL on a Red Hat Linux server in Microsoft Azure. The post assumes the reader has experience using Microsoft Azure so those steps will not be detailed. A lot of the information came from this Microsoft link. Creating a Linux Virtual Machine …

Understanding ACID, BASE, and CAP in Databases

In the world of databases when we talk about writing data into a database the topic of transactions comes up. When talking about transactions and Relational Databases the acronym ACID is implied. In the world of NoSQL we also have BASE and CAP. So what exactly does all this mean? Let’s discuss these three acronyms. …

How to Dynamically Load Different Versions of a .NET Assembly

Picture the scenario. You have a .NET windows service running on a 1000 servers and one of the assemblies needs an update. How does each service pick up the update? There are two options Package and deploy your application to each of the 1000 servers as you normally do. Have your service look at a…

SOLID Principles Part 02: Single Responsibility Principle

Principle A class should only have a single responsibility. E.g. If it’s a logging class it should only do logging. If it’s a payments class it should only do payments, and so forth. A class should only have one reason to change. Scenario To demonstrate SRP I will use an E-Commerce…

SOLID Principles Part 03: The Open Closed Principle

Principle A class, properties and methods should be open for extension but closed for modification. E.g. If we need to add new functionality to a class, it should be added using a derived class. Scenario To demonstrate OCP I will continue using the E-Commerce example from the previous blog. A customer…

OData v4 in ASP.NET WebApi Part 09: Composite Keys

This is a series of blogs detailing my introduction to using OData v4 with C# and ASP.NET WebApi. The source code for the project can be found here. In the last blog we created a customer entity set with a single key. In this blog I will create a composite key on an entity. Creating…

Unit Testing in C# Part 01: Tenpin Bowling Scorer

In this tutorial series I will be showing how we can develop a ten pin bowling class to calculate a players score using Unit Testing. This makes a difference from the usual calculator demos you normally see. There are myriad of sources that explain Unit Testing and implementing classes using Test Driven Development (TDD), so…

Unit Testing in C# Part 03: Building Out Class 1

In the last blog I discussed the project structure and the unit testing frameworks I will use. In this blog I will begin building out the class and tests based on our business requirements. Players Name I need to enter a player’s name and have the ability to get it. I always start…

__trashed 3

In the last blog I introduced Redis. In this blog I will cover some of the basics. Command Line Interface You can interact with the Redis server using the redis-cli command line interface. Here I am checking my Redis server is up and running. Note: I am using an installation by Jetware…