- Custom assertion methods based on a context (Simulation)
- Custom Soft Assertion using the methods from the Custom Assertion
- Test class using both Custom and Custom Soft Assertion
- Use the event-source branch
- Start the application
- Login to H2 (sa/password)
- Run a query into the EVENT_SOURCE table
- Make a POST request (you can use the Swagger UI)
- Run a query into the EVENT_SOURCE table
- The insertion will occur only 7 seconds after the request
- Test class: EventTest
- Run the
checkEventWithRestriction_Fail()
and see it failing because of the 7 second's delay - Run the
checkEventWithRestriction_Success()
and see the test green
There’s no asynchronous system here. A delay of 7 seconds was added in the EventService that will be called by the RestrictionController methods and SimulationsController for the POST
and DELETE
methods.
Muito bom. Parabens pelas informações aqui. Obrigado