Chocolatey machine setup   #Administrator privileges check If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(` [Security.Principal.WindowsBuiltInRole] “Administrator“)) { Write–Warning “You do not have Administrator rights!`nPlease run the build shell as administrator!“ exit } $scriptPath = $MyInvocation.MyCommand.Path $scriptDirectory = Split–Path $scriptPath $customDir […]

Context Specification

tnamespace Example { using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Rhino.Mocks; public abstract class ContextSpecification<T> { protected Exception executionException; protected T sut { get; set; } [TestInitialize] public void Start() { this.Context(); this.SetupMockResults(); this.Because(); } [TestCleanup] public […]

Design Principles

The Open/Closed Principle Software entities (classes, modules, etc) should be open for extension, but closed for modification The Liskov Substitution Principle Liskov’s notion of “subtype” is based on the notion of substitutability; that is, if […]