Author Archives: Alexander

ASP.NET Web API documentation using Swagger – Introduction

Providing always up-to-date and exhaustive documentation for your WEB API could be quite a challenging task. Swagger and Swashbuckle did a great job to provide uniform documentation for any kind of API. Let’s look into this using simple demo discount API example. … Continue reading

Posted in Documentation, WEB API | Tagged , | Leave a comment

AutoFixture > Using [Frozen] attribute on test method parameter

[Frozen] attribute is used to freeze instances of objects. It is applied on test method parameters. We will consider simple examples with string comparison test. Without [Frozen] attribute Result: Failed Using [Frozen] attribute Applying [Frozen] on the first parameter of type … Continue reading

Posted in Unit test | Tagged , | Leave a comment

AutoFixture > Customize objects creation with ICustomization interface

In this post we will look at AutoFixture basic customization features starting with ICustomization interface. We will use following DateRange class as demonstration example. If we write test method using DateRange as parameter: Test will sometimes fail with “System.ArgumentExceptionFinish date … Continue reading

Posted in programming, Unit test | Tagged , | Leave a comment

Using discriminated unions to fix Liskov substitution principle violation

As an example of LSP violation, I will consider e-commerce payment system design. One needs to develop generic mechanism for multiple payment service providers (PSP) that are using on checkout step. From the requirements there are different kinds of PSP in terms of integration. … Continue reading

Posted in object-oriented-principles, software-patterns | Leave a comment

FAKE.IIS Add application to existing IIS site

Recently I had a task to change IIS application path in existing IIS site. That was repetitive operation so I decided to write script for it. I recently began to study F# and function programming so decided to try FAKE. There is … Continue reading

Posted in F# | Tagged , | Leave a comment

Tools and libraries to consider when writing autotests

Below is a summary of tools/libraries I have used to build large maintainable suite of auto tests on large web project. Test Framework XUnit is a developer testing framework, built to support Test Driven Development, with a design goal … Continue reading

Posted in Unit test | Tagged | Leave a comment

How to identify process ID in PerfMon

Last time I need to troubleshoot memory leak in IIS process hosted on productions server I decided to start with PerfMon and got stuck on Add Counters screen, where I saw seventeen w3wp (IIS process name) processes up to w3wp#17. Here for … Continue reading

Posted in SysInternals | Tagged | Leave a comment