mogen_unit_tests library

CLI tool that scans lib/features/**/presentation/notifiers/, parses Riverpod AsyncNotifier classes, detects repository dependencies via ref.read(), and generates Mocktail-based unit tests with success and error cases for every method.

Run from your Flutter project root:

dart run mogen_unit_tests

Classes

FeatureBundle
A discovered feature with its notifier and state source files.
FeatureScanner
Scans lib/features and groups notifier and state files by feature.
MethodInfo
A public method on the notifier that will receive generated test cases.
MockValueGenerator
Maps a Dart type string to a sensible literal for generated test scaffolding.
NotifierInfo
Everything the generator needs to know about one Riverpod notifier class.
NotifierParser
Parses a notifier source file and returns all NotifierInfo found.
OrchestratorResult
Summary of the results produced by a test generation run.
ParamInfo
A single method or constructor parameter.
RepositoryDep
A repository or service dependency detected inside the notifier.
StateField
A single field declared on a state class.
StateInfo
Information about the matching state class found in the states/ folder.
StateParser
Parses state files in presentation/states/ and extracts field types so the generator can produce type-accurate mock data.
TestGenerator
Generates a complete Mocktail + Riverpod test file for one NotifierInfo.
TestOrchestrator
Runs the feature scan and writes generated tests into test/features.