I want to write a tesa for the websocket controller, but no example from the network calls me the methods from the controller. Who already has experience writing such tests, please set an example.
Controller:
@Controller public class SectionContoller { @Autowired private ISectionService sectionService; @MessageMapping("/section/add") @SendToUser public Message addSection(EntitySection section){ sectionService.addSection(section); return MessageBuilder .withPayload("") .setHeader(HEADER_STATUS,STATUS_OK) .build(); } } UPDATE 1
I tried to connect to the websocket server using this method, but in the logs the connection was not displayed, did the MB have any subtlety of using the Websocket spring client?
addSectionshouldaddSectionand return a message. I just can not understand how to test controllers for websocket. - Bleser/app/section/add. - Bleser