Releases: astubbs/truth-generator
Releases · astubbs/truth-generator
0.1.1
Changes
- major: Discover user managed Subject classes as compiled or as source code (#117)
- Fix eclipse jdt dep complexity by just using Roasters shaded / packaged version instead (#119)
- build: Use Java 17 and 18 (#120)
- Don't try to generate assertion methods for Legacy class' void return methods (#118)
Deps:
- build(deps): bump assertj-core from 3.22.0 to 3.23.1 (#129)
- build(deps): bump maven-release-plugin from 3.0.0-M5 to 3.0.0-M6 (#127)
- build(deps): bump maven-surefire-plugin from 3.0.0-M6 to 3.0.0-M7 (#126)
- build(deps): bump styfle/cancel-workflow-action from 0.9.1 to 0.10.0 (#123)
- build(deps): bump javassist from 3.28.0-GA to 3.29.0-GA (#115)
- build(deps): bump version.roaster from 2.24.0.Final to 2.25.0.Final (#116)
- build(deps): bump lombok from 1.18.22 to 1.18.24 (#106)
- build(deps): bump maven.version from 3.8.5 to 3.8.6 (#125)
- build(deps): bump maven-invoker-plugin from 3.2.2 to 3.3.0 (#124)
- build(deps): bump actions/setup-java from 2 to 3 (#105)
- build(deps-dev): bump podam from 7.2.8.RELEASE to 7.2.9.RELEASE (#104)
- build(deps): bump byte-buddy from 1.12.8 to 1.12.12 (#122)
0.1
Initial release
Features
Primary
- Boiler plate and assertion generator system for {googletruth}
- Template generation so that Users can easily add assertions, be added to VCS for maintenance and automatic incorporation to future Subject tree generation runs
- Chained assertion strategies (e.g.
assertThat(person).hasAddress().hasStreet().ignoringCase().endsWith('Rd')
- Recursive generation of
Subject
s so you don’t have to register them yourself - including going into external and/or restricted modules (i.e. java'sUUID
,ZonedDateTime
etc)
-- For example, you register only a single class with the plugin, and it will generate Subject's for every single referenced class in the tree. - Generated assertion strategies for standard field types
- Single convenient entry point for all managed
Subject
s - Extendable root Subjects from the
Truth
library injected into generated code, e.g.:
--MyStringSubject
: Equality check ignoring white space and line endings, file content equality
--MyMapSubject
: key content check and others - Subject's for restricted packages automatically shaded (like
java.*
classes -UUID
etc) Tree depth limits can potentially be added to limit the quantity of generated code. - Maven plugin (can make plugins for other systems if requested)
Secondary
- Dog foods - uses its own bootstrapped Subjects to test itself
- Various ways to specify classes under test for generation in the plugin
- Detection of existing user managed
Subject
s under version control - won't regenerate, and will be injected into the generated structure - Support for legacy non bean compliant objects like Kafka's https://kafka.apache.org/21/javadoc/org/apache/kafka/clients/consumer/ConsumerRecord.html[ConsumerRecord]
- Collections, maps etc
generic
types are read and used in generated assertions
-- i.e.assertThat(Map<MyKey, ?> map)#containsKey(MyKey key)
- Customisable extension points for base subjects (like list and map) which will apply to all types in generated tree (where generated entry points are used)