Skip to content

mortenfroelich/StatePrinter

 
 

Repository files navigation

StatePrinter

Join the chat at https://gitter.im/kbilsted/StatePrinter

Build status Nuget Nuget Nuget Coverage Status Stats Stats

What is Stateprinter

A simple framework for automatic Assert.AreEquals(), Assert.That() and ToString()

StatePrinter is a little library that turn any object-graph into a string representation. It is mainly intended automating writing ToString methods and help automating aspects of writing and maintaining unit tests. Code which is rather dreary and boring to write.

Why you should take StatePrinter for a spin

  • No more manual .ToString() - it is much easier to write robus and self-sufficient ToString() methods.
  • No more manual writing/updating Asserts - both for new tests and when the code changes, all tests can automatically be corrected.
  • No more screens full of asserts. Especially testing against object-graphs is a bliss.
  • Very configurable and extensible.
  • It is part of the back-end engine of other projects

How do I get started

The documentation is split into

and

and

Where can I get it?

Install Stateprinter from the package manager console:

PM> Install-Package StatePrinter

And for pre-release versions

PM> Install-Package StatePrinter -Pre

How can I get help?

For quick questions, Stack Overflow is your best bet. For harder questions, bugs, issues or feature requests, create a GitHub Issue (and let's chat).

How can I help out

Everyone is encouraged to help improve this project. Here are a few ways you can help:

  • Blog about your experinces with the tool. We highly need publicity. I'll gladly link from here to your blog.
  • Report bugs
  • Fix issues and submit pull requests
  • Write, clarify, or fix the documentation
  • Suggest or add new features

StatePrinter has been awarded a ReSharper group lincense, to share among all active contributers.

History

Version History: http://github.com/kbilsted/StatePrinter/blob/master/CHANGELOG.md

This file describes the latest pushed changes. For documentation of earlier releases see: 1.0.6, 1.0.5, 1.0.4

Upgrading from v1.xx to v2.0.x should be a matter of configuring the Configuration.LegacyBehaviour

Requirements

Requires .NET 3.5 or newer.

License

Stateprinter is under the Apache License 2.0, meaning that you can freely use this in other open source or commercial products. If you use it for commercial products please have the courtesy to leave me an email with a 'thank you'.

Have fun!

Kasper B. Graversen

About

Automating unit testing and ToString() coding

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.7%
  • Shell 0.3%