Kotlin + SpringBootTest + Junit 5 + AutoConfigureMockMvc: test passing when it was supposed to fail (seems @BeforeEach not taking effect)
问题 I coded a very simple and common CRUD in Kotlin. I want to do basic tests as testing post, delete, get and put. Probably I understood something wrong: I used Beforeeach aimed to insert a register so I could check during get test. I don't get exception but it seems during get test it always returning ok when it should be NOT_FOUND for any other id different than 1 in bellow test. Any clue or guidance in right direction will be wellcome even if see other bad practice bellow based on my purpose