-
Notifications
You must be signed in to change notification settings - Fork 653
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(InMemorySinger) - Implement a InMemorySigner::test method #12503
Comments
Hi, The above is used already in couple places. Did you consider using it instead of creating new one? Also maybe returning Singer instead of InMemorySigner could come handy as it would simply #12472 for #1531. What do you think? I could implement that :) |
I'm against this though it's more of a preference than objective thing. My thinking is that as developer whenever I need to pass an InMemorySigner somewhere I can just look at that class and use the test method.
Hmm I would rather return the InMemorySigner but perhaps we can do both? e.g.
Feel free to grab this task, thank you! |
Following the issue near#12503 the commit provides and factory methods for testing purposes only. Use case examples are also provided. The general idea is to wrap verbose but prevalent pattern of setting up a test case with calls.
Following the issue near#12503 the commit provides and factory methods for testing purposes only. Use case examples are also provided. The general idea is to wrap verbose but prevalent pattern of setting up a test case with calls.
Following the issue near#12503 the commit provides and factory methods for testing purposes only. Use case examples are also provided. The general idea is to wrap verbose but prevalent pattern of setting up a test case with calls.
Following the issue near#12503 the commit provides and factory methods for testing purposes only. Use case examples are also provided. The general idea is to wrap verbose but prevalent pattern of setting up a test case with calls.
@wacban I could provide a followup commit with some more code refactor to use test/test_signer. Please let me know if you would like me to do it :) |
@mkamonMdt That would be great, go for it, thank you! |
Two factory methods for InMemorySigner were provided in near#12503. The following commit applies the methods broadly, reducing verbose test code where possible.
Two factory methods for InMemorySigner were provided in near#12503. The following commit applies the methods broadly, reducing verbose test code where possible.
Description
There is a prevalent pattern in our test code:
It's quite verbose and annoying. The goal of this task is to implement a shorter
InMemorySigner::test(account_id)
that would do the above. Additionally please refactor a few usages of the old pattern with the new, shorter one. It should only be used in tests.The text was updated successfully, but these errors were encountered: