Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个接受包含 XML 消息的请求的 ActionBean。有没有办法让我使用 Stripes 中包含的模拟框架来模拟这个操作?
虽然 Stripes 模拟框架做得很好,但我经常发现只对动作 bean 进行单元测试就好像它只是一个 POJO 一样更简洁。对于更复杂的测试,我使用Mockito(或EasyMock)。
我刚刚意识到我可能只是从自定义 ActionBeanContext 方法中模拟它,而实际的应用程序上下文实现将直接访问请求对象。