Skip to content

Conversation

@wsargent
Copy link
Contributor

Adds a package level constructor for OAuthSignatureCalculator to directly set the nonce and timestamp for testing, and adds some tests to ensure that the requestbuilder is using the signature calculator correctly.

@slandelle
Copy link
Contributor

I like the test, but I'm not found of adding 2 members just for tests. Why not simply delegate nonce and timestamp computation to protected methods that tests can override?

Note that you declared testTimestamp as a Long wrapper, but then handle it as a primitive, causing a possible NPE.

Thanks!

@slandelle
Copy link
Contributor

@wsargent I'll merge and clean up as I suggested. Thanks!

slandelle pushed a commit that referenced this pull request Feb 23, 2015
@slandelle slandelle merged commit 8fe9993 into AsyncHttpClient:master Feb 23, 2015
@slandelle slandelle added this to the 1.9.11 milestone Feb 23, 2015
@slandelle slandelle self-assigned this Feb 23, 2015
@slandelle
Copy link
Contributor

Ported on 1.9.x as of 692bad1

@wsargent wsargent deleted the wsargent-oauth-tests branch February 23, 2015 18:54
@wsargent
Copy link
Contributor Author

Thanks!

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