mercredi 28 octobre 2015

mocoServer - explanation of code

I have the below lines in one of the projects that I am working on in one of the test classes. I went over mocoServer documentation but wasn't able to understand the below lines. Please can you explain the code listed below?

mocoServer.
  request(by(uri("/as/token.oauth2"))).response(contentFromFile(DIR, "token.json"));

mocoServer.request(and(contain(text("Account")))).response(
        with(contentFromFile(TEST_COMMON_DIR, ACCOUNT_RESPONSE)));

Aucun commentaire:

Enregistrer un commentaire