Expect for .NET 1.2.0

Expect for .NET 1.2.0 overview

Expect for .NET 1.2.0 introduced one major change not strictly connected to code. New versioning system. Some of you probably noticed that I was looking for good versioning system. Now I found the one with clear and strictly defined rules – Semantic Versioning (http://semver.org). Below is shortcut of rules from mentioned webpage:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.

Because two last releases 1.0.1 and 1.1.38 broke above-listed rules I decided to fix them in this release. This release includes only changes in build scripts to follow new versioning system and changes in code to restore backward compatibility to all previous releases.

Changes in detail

Build script

Build script was updated to create assemblies and nuget package using new version format. Nuget packages have version MAJOR.MINOR.PATCH-LABEL where ‘-LABEL’ is optional. Assemblies have version format MAJOR.MINOR.PATCH.0 (the last digit is zero). There was also removed functionality to automatically step build number as it is not used. The version must be manually set in the build script before build.

Restored Expect.TimeoutException

In version 1.1.38 was removed Expect.TimeoutException and replaced with System.TimeoutException. In Expect for .NET 1.2.0 the Expect.TimeoutException was restored as a subclass of System.TimeoutException. Thanks to that the exception can be caught as Expect.TimeoutException (versions 1.0.0-1.0.1) and System.TimeoutException (version 1.1.38). The restored Expect.TimeoutException is marked as obsolete with comment suggesting to use System.TimeoutException.

Restored send() and expect() methods

In version 1.0.1 were replaced send() and expect() methods with Send() and Expect() methods. In Expect for .NET 1.2.0 the send() and expect() methods are restored and marked as obsolete. Their implementation is to call proper Send() or Expect() method.


You can download it from nuget and github.

I also configured nuget to not list versions 1.0.1 and 1.1.38 as they are not backward compatible.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.