I'm currently creating a custom Filter object which will catch certain urls, check if they contain parameters that will be displayed on screen(as in the UI), and then sanitise those parameters. At the minute im trying to create a few url patterns but I'm not sure how to test them without doing it manually, which would be very time consuming.
How would I go about creating unit tests to check if the url pattern is matched and therefore the request intercepted? I don't want to test anything else, only that the urls I want to be caught are caught. What libraries would I need alongside JUnit, or can this be done without the use of a third party library?(preferable, but if its impossible/incredibly time consuming I will use a library or framework)
Aucun commentaire:
Enregistrer un commentaire