truth0/truth — pull request #21 by cgruber (2012-07-27 08:22:06+00:00)
Title: Add ClassSubject and field content tests to Subject

Adds ClassSubject to propose the presence of fields in a class definition.

Also adds fieldname/value test for an object for arbitrary field content checking.

This is controversial, but quite useful in cases where you have bytecode-generated accessors/mutators and want to check field contents without compile-time access to such accessors. It does let you peek under the hood which can be a bad testing practice, but it can also vastly simplify certain tests, and avoid lots of cases of having to create a unique Subject for a custom object, especially custom value types.