TF-1008 Unit-test for handleSetErrors()

This commit is contained in:
Dat PHAM HOANG
2022-11-14 22:53:07 +07:00
committed by Dat H. Pham
parent e2d9f4e6ee
commit 7f62d8257d
2 changed files with 469 additions and 3 deletions
@@ -17,19 +17,22 @@ mixin HandleSetErrorMixin {
if (notDestroyedError != null && notDestroyedError.isNotEmpty) {
notDestroyedError.entries
.map((e) => _handleInChain(e, notDestroyedHandlers))
.map((optionError) => _handleRemainedError(unCatchErrorHandler, optionError));
.map((optionError) => _handleRemainedError(unCatchErrorHandler, optionError))
.toSet();
}
if (notCreatedError != null && notCreatedError.isNotEmpty) {
notCreatedError.entries
.map((e) => _handleInChain(e, notCreatedHandlers))
.map((optionError) => _handleRemainedError(unCatchErrorHandler, optionError));
.map((optionError) => _handleRemainedError(unCatchErrorHandler, optionError))
.toSet();
}
if (notUpdatedError != null && notUpdatedError.isNotEmpty) {
notUpdatedError.entries
.map((e) => _handleInChain(e, notUpdatedHandlers))
.map((optionError) => _handleRemainedError(unCatchErrorHandler, optionError));
.map((optionError) => _handleRemainedError(unCatchErrorHandler, optionError))
.toSet();
}
}