mockable library
Annotation and runtime helpers for package:mockable_gen.
See README for usage. Add @Mockable() to a class, then run
dart run build_runner build to generate a sibling xxx.mock.dart
library with XxxMock.mock() and XxxMock.mockList(count) factories.
Classes
- Mockable
-
Marks a class for mock generation by
package:mockable_gen. - MockableIgnore
-
Marks a single field so the generator emits
nullfor it instead of a faker-generated value. The consumer is expected to override the field if they need a non-null value. - MockFaker
-
A small static façade over
package:fakerproviding the helpers thatmockable_genemits in generated.mock.dartfiles.