Added an integration-test that tests the exception-handling
authorKai Moritz <kai@juplo.de>
Sat, 19 Sep 2020 12:08:38 +0000 (14:08 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 28 Sep 2020 19:28:00 +0000 (21:28 +0200)
commit462d5bb4005e9128cc76911049a84252d0beeec1
tree6a7de62506545f2b7498e3fda8963ff8060d8704
parent7bf76e7ab569dd3392b3904a734bb1895bd219a2
Added an integration-test that tests the exception-handling

* The integration-test uses WebTestClient to test the exception-handling
* Since this is a real integration-test, the exception-handling behave
  exactly the same way
* The test-setup with the WebTestClient needs an additional dependency, to
  work correctly - without it, the WebTestClient-Bean would not be intanciated
* The added test ExceptionHandlingApplicationIT tests exaclty the same stuff,
  as ExceptionHandlingApplicationTest - this is no good test-design, but it
  serves the intention, to compare the two approaches
* Since Spring-Boot configures the surefire-maven-plugin to ignore all tests,
  that end with IT, the failsafe-maven-plugin has to be added to automatically
  fire the new test - remember: you have to call "mvn verify" to fire IT
pom.xml
src/test/java/de/juplo/demo/ExceptionHandlingApplicationIT.java [new file with mode: 0644]