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

Optimise test framework (bunq/sdk_java#78) #85

Merged
merged 14 commits into from
May 28, 2018

Conversation

OGKevin
Copy link
Contributor

@OGKevin OGKevin commented May 12, 2018

References #78

@OGKevin OGKevin added this to the 0.13.5 milestone May 12, 2018
@OGKevin OGKevin self-assigned this May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@bunq bunq deleted a comment May 12, 2018
@OGKevin
Copy link
Contributor Author

OGKevin commented May 16, 2018

@patrickdw1991 please 👀

private static final String LANGUAGE_EN_US = "en_US";
private static final String REGION_NL_NL = "nl_NL";
private static final String GEOLOCATION_ZERO = "0 0 0 0 000";
public static final String LANGUAGE_EN_US = "en_US";

Choose a reason for hiding this comment

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

public under private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm., i normally group constants in groups, not on visibility. Error constants on top, ten the first used group in the class. So there could indeed be a mixture of visibility in a specific group.

private static final String FIELD_API_KEY = "ApiKey";
private static final int INDEX_FIRST = 0;

protected static final String TEST_CONFIG_PATH = "bunq-test.conf";

Choose a reason for hiding this comment

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

protected under private?

requestSpendingMoney();

try {
Thread.sleep(500);

Choose a reason for hiding this comment

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

Why this sleep?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To ensure the spending money request has been accepted before refreshing. The refresh part will be added with #79

secondMonetaryAccountBank = MonetaryAccountBank.get(response.getValue()).getValue();
}

private static void requestSpendingMoney() {

Choose a reason for hiding this comment

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

People using the SDK might not really understand what's actually happening here, maybe just add a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but, this is internal lib ? User shouldn't even know whats is happening here ? 🤔

Choose a reason for hiding this comment

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

It's open source. People might want to look into why a request was randomly created and paid.

Copy link
Contributor Author

@OGKevin OGKevin May 22, 2018

Choose a reason for hiding this comment

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

in the tests ? :P i have this rule, if i need to write a doc block explaining something then the method name is not good enough or should be split in multiple methods. is this the case here ? 🤔

Choose a reason for hiding this comment

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

In the test. We actually mention how to run the tests in the README.md.

In this case the method name is clear but the process is quite weird (the sugar daddy stuff), I'm also not a big fan of comments but somethimes stuff happens outside of the code and it's not clear that's where you want to explain a bit.

This is open source code so people will actually look at it to understand, it's not something internal where we just point to a wiki. Or you can just create a wiki for the github page :P

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will write a comment in then 👍

}

}
protected static Pointer getPointerBravo() {

Choose a reason for hiding this comment

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

And wasn't the convention to always add (empty) docblocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i thought we agreed to there is no need for it anymore 🤔 as it didn't bring any value as its a strict typed lang.

Choose a reason for hiding this comment

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

We agreed on being consistent I think. I have posted multiple times that they where not there and you added it multiple times as that was the way you did it before. Switching styles all the time is messy, do it or don't but make sure to do it consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alrighty then, as its a strict lang, no need for empty doc blocks. in the non strict ones will add doc blocks to define parameters etc.

Choose a reason for hiding this comment

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

Ok so you're gonna change this in the generator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, but in a future PR then. That might cost some time. Will create followup issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#88

patrickdw1991
patrickdw1991 previously approved these changes May 28, 2018
@OGKevin OGKevin merged commit 1deed2e into develop May 28, 2018
@OGKevin
Copy link
Contributor Author

OGKevin commented May 28, 2018

@andrederoos

@OGKevin OGKevin deleted the optimise_test_framework_bunq/sdk_java#78 branch May 28, 2018 13: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.

2 participants