mockable_gen 0.3.0 copy "mockable_gen: ^0.3.0" to clipboard
mockable_gen: ^0.3.0 copied to clipboard

Build_runner generator that emits .mock.dart files with realistic XxxMock.mock() / XxxMock.mockList(n) factories for classes annotated with @Mockable() from package:mockable.

example/README.md

mockable_gen example #

An end-to-end consumer of mockable + mockable_gen that shows deep, cross-file nesting from a single annotation. Only lib/company.dart is annotated; the Department → Team → Member models live in separate files under lib/models/ and are mocked automatically.

dart pub get
dart run build_runner build
dart run bin/main.dart

The first command resolves dependencies; the second generates the standalone lib/company.mock.dart library (importing every nested model file); the third prints a fully-populated four-level mock tree.

0
likes
150
points
130
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Build_runner generator that emits .mock.dart files with realistic XxxMock.mock() / XxxMock.mockList(n) factories for classes annotated with @Mockable() from package:mockable.

Repository (GitHub)
View/report issues

Topics

#code-generation #mock #testing #skeletonizer

License

MIT (license)

Dependencies

analyzer, build, dart_style, meta, mockable, source_gen

More

Packages that depend on mockable_gen