We are writing unit tests for our java apis using RESTEasy Server Side Mock Framework. As part of the tests, we also need to simulate user login. Some parts have to be done by user1, followed by user2 and then user1 again.
In the actual application, the login is handled via CAS server, ie the cas web server is available.
In the tests, we are able to mock the RESTEasy services using the mock framework. The cas login REST api's are documented, but they would be part of a separate webapp and not the business webapp that involves user 1 and user 2.
How do we mock the CAS login services without having to bring up the cas server during unit testing?
If the question is not clear please let me know and I can add more details.
Aucun commentaire:
Enregistrer un commentaire