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

test: add tests for TransactionNotifier #317

Merged

Conversation

victoreronmosele
Copy link
Contributor

@victoreronmosele victoreronmosele commented Oct 16, 2024

This PR adds tests for the TransactionNotifier class.

Closes #291.

Comment on lines 15 to 17
class Listener<T> extends Mock {
void call(T? previous, T next);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

think we can just move this to mocks.dart

Comment on lines 29 to 33
final pfi = TestData.getPfi('did:dht:pfiDid');
const exchangeId = 'rfq_01ha835rhefwmagsknrrhvaa0k';
final parameters = TransactionProviderParameters(pfi, exchangeId);

final did = TestData.aliceDid;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: let's move this to right below the await TestData.initializeDids()

Comment on lines +48 to +57
final container = createContainer(
overrides: [
didProvider.overrideWith(
(ref) => did,
),
tbdexServiceProvider.overrideWith(
(ref) => mockTbdexService,
),
],
);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice use of the createContainer() helper!

@victoreronmosele
Copy link
Contributor Author

Thanks for the feedback!

All comments have been addressed.

Copy link
Contributor

@ethan-tbd ethan-tbd left a comment

Choose a reason for hiding this comment

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

great work once again :)

@ethan-tbd ethan-tbd merged commit fdf2352 into TBD54566975:main Oct 17, 2024
1 check passed
@victoreronmosele victoreronmosele deleted the tests-for-transaction-notifier branch October 18, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create tests for TransactionNotifier
3 participants