Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Migrate from mockito to mocktail in TransactionSigningGateway #250

Merged
merged 4 commits into from
Apr 4, 2022

Conversation

wal33d006
Copy link
Contributor

No description provided.

@wal33d006 wal33d006 added Technical 🛠 Technical task not closely coupled with any feature 🛠 Refactor 🛠 labels Apr 4, 2022
@wal33d006 wal33d006 self-assigned this Apr 4, 2022
@wal33d006 wal33d006 requested review from andrzejchm and Zfinix and removed request for andrzejchm April 4, 2022 12:01
Copy link
Contributor

@andrzejchm andrzejchm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! few minor updates and we're good to merge 👍🏻

dev_dependencies:
flutter_test:
sdk: flutter
lint: 1.8.1
very_good_analysis: 2.4.0
mockito: 5.0.14
mocktail: ^0.3.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's stick with exact version for mocktail

Suggested change
mocktail: ^0.3.0
mocktail: 0.3.0

@@ -1,6 +1,6 @@
import 'package:cosmos_utils/cosmos_utils.dart';
import 'package:dartz/dartz.dart';
import 'package:mockito/mockito.dart';
import 'package:mocktail/mocktail.dart';
import 'package:transaction_signing_gateway/model/account_lookup_key.dart';
import 'package:transaction_signing_gateway/model/private_account_credentials.dart';
import 'package:transaction_signing_gateway/storage/key_info_storage.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with mocktail, this mock implementation can be now reduced to:

class KeyInfoStorageMock extends Mock implements KeyInfoStorage {}

@@ -1,5 +1,5 @@
import 'package:dartz/dartz.dart';
import 'package:mockito/mockito.dart';
import 'package:mocktail/mocktail.dart';
import 'package:transaction_signing_gateway/model/transaction_signing_failure.dart';
import 'package:transaction_signing_gateway/model/unsigned_transaction.dart';
import 'package:transaction_signing_gateway/transaction_summary_ui.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here:
with mocktail, this mock implementation can be now reduced to:

class TransactionSummaryUIMock extends Mock implements TransactionSummaryUI {}

@wal33d006 wal33d006 merged commit 018b231 into main Apr 4, 2022
@wal33d006 wal33d006 deleted the mockito-to-mocktail branch April 4, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 Refactor 🛠 Technical 🛠 Technical task not closely coupled with any feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants