Mock or simulate Message Queue (JMS)

前端 未结 4 1656
失恋的感觉
失恋的感觉 2021-02-04 00:11

There is a message(text), which format and content i definitely know.
For now,class in Java,that parses and reads this message from file,is implemented.

In real wor

4条回答
  •  感动是毒
    2021-02-04 00:49

    Generally it is a bad practice to mock or simulate an external system, such as JMS. A better idea would be to abstract your logic into a standalone bean, implement a delegation layer that would bridge JMS with your bean. With such design you can test your bean in isolation from JMS and then have system test that would test the whole integration with real JMS system.

    As for in-process JMS you can look at SomnifugiJMS.

提交回复
热议问题