ShouldBe

Beautiful assertions for complex object graphs. An open source project.

THE PROBLEM

During Neway's Partner Services project, we relied heavily on message-based architecture. Data and operations are separated, which makes testing easier but, we found that our productivity still suffered. Constraints written with other unit testing frameworks were verbose, unstructured and difficult to follow.

THE SOLUTION

I crafted the ShouldBe assertion library which leverages generics, method chaining and static lookup tables to add syntactical sugar for asserting the complex object graphs of API messages.

OUTCOME

Using ShouldBe our integration tests became concise and reflected the structure of each message. It received positive responses on Reddit and Hacker News. It's currently used by a small community of developers and is being considered for a merge into the popular assertion library Shouldly

TECHNOLOGY

C#
Nuget
AppVeyor
CompareNetObjects