I'm writing a unit test for a Play (written in java) controller. I've made it return a Promise. I'm trying to check the status of the result that it returns but I'm getting an error of the following:
Promise<Result> resultPromise = myController.show();
assertEquals(OK, status(resultPromise.get(1000)));
The error I get is:
incompatible types: Result cannot be converted to int
assertEquals(OK, status(resultPromise.get(TEST_TIMEOUT)));
^
It compiles fine when I the controller doesn't return a promise.
Can someone point me to what I'm doing wrong?
Aucun commentaire:
Enregistrer un commentaire