MockGenerator class
Generates mock classes using mocktail pattern.
Example output:
class MockAuthRepository extends Mock implements AuthRepository {}
Constructors
- MockGenerator({required String className, required String importPath})
Properties
- className → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- importPath → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
generate(
) → String - Generates a complete mock file with imports.
-
generateMockClass(
) → String - Generates a mock class declaration string.
-
generateMocktailImport(
) → String - Generates the import statement for mocktail.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited