data_builder_test 0.11.0 copy "data_builder_test: ^0.11.0" to clipboard
data_builder_test: ^0.11.0 copied to clipboard

craft_runner builder plus annotations that generate immutable fluent data builders from @dataBuilder-annotated test classes.

0.11.0 #

  • Support craft_runner 0.11.x.
  • Added @DataPreset() for declaring named groups of schema field values.
  • Presets generate immutable fluent methods such as pending()withPending() and compose with ordinary setters using last-call-wins ordering.
  • Added validation for preset signatures, bodies, assigned fields, and generated method-name conflicts.

0.10.0 #

Initial release. Versioned in lock-step with the craft_runner ecosystem.

  • DataBuilderCraftBuilder — a craft_runner single-file builder that emits a <Name>Builder extends Buildable part next to every @dataBuilder class.
  • Immutable fluent API: a const default constructor, a withX(...) per field returning a new instance, and build() producing the serialized map.
  • Untouched fields fall back to their declared default via a per-field _<field>IsSet flag, so a test states only the values it cares about.
  • @DataField(key:, includeIfNull:, settable:) for per-field map key overrides, null omission, and read-only fields.
  • Nested builders: a field of a non-scalar type serializes recursively, for both single values and List<...>.
0
likes
130
points
200
downloads

Documentation

API reference

Publisher

verified publisherahmedomar.com.ly

Weekly Downloads

craft_runner builder plus annotations that generate immutable fluent data builders from @dataBuilder-annotated test classes.

License

MIT (license)

Dependencies

analyzer, craft_runner, dart_style, path

More

Packages that depend on data_builder_test