Skip to content

Instantly share code, notes, and snippets.

@dmcg
Created November 17, 2014 23:25
Show Gist options
  • Save dmcg/8bdde635acca45139888 to your computer and use it in GitHub Desktop.
Save dmcg/8bdde635acca45139888 to your computer and use it in GitHub Desktop.
mockery.when(() -> servlet.process(
ImmutableMap.of(
"code", new String[]{ codeValue},
"state", new String[]{ state }),
"http://rescyoume/oauth",
response)).
then(expect -> {
expect.oneOf(stravaAuthenticator).fetchDetails(codeValue, oAuthAccount, clientState, "http://rescyoume/oauth");
expect.will(returnValue(oAuthDetails));
expect.oneOf(db).save(oAuthDetails);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment