UnitTestGenerationService class

Service for generating comprehensive unit tests for JSON2Dart models

This service handles the generation of unit tests for data sources, repositories, entities, use cases, blocs, and mapper extensions.

Constructors

UnitTestGenerationService({required String projectName, String bodyDateFormat = '.toIso8601String()', String responseDateFormat = '.toIso8601String()'})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateApiTestData({required String testPath, required String featureName, required String pageName, required String apiName, required String jsonBody, required String jsonResponse, required dynamic bodyData, required dynamic responseData, required String method, required List<String> paramPath, required String? pathHeader, required String? cacheStrategy, required int? ttl, required bool? keepExpiredCache, required String returnData}) Map<String, String>
Generates individual API test data
generatePageTests({required String testPath, required String featureName, required String pageName, required List<Map<String, String>> testData}) → void
Generates all unit tests for a page
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