【发布时间】:2013-11-20 01:57:06
【问题描述】:
我目前正在使用的应用程序正在由 3 个独立的团队开发,每个团队在一天结束时共同处理不同的功能领域。困难在于使 3 个团队始终保持同步,并且不让一个团队的问题影响另一个团队。我正在寻找一种方法来存根/模拟对其他团队提供的其中一些服务的调用,以便我们可以在大部分时间单独工作,但在需要时快速切换回集成模式。
理想情况下我希望:
- during normal development, I could turn on a flag and those services will be mock services (for example, when I am just developing away on my part of the code and don't really care if the other team's service returns the right thing, just that it returns something)
- I don't want to have add code to check this flag everywhere in the code and if it is on, use the mock, else use the real thing... I just want it to automatically know to use the mock class when this flag is on
我们正在使用 Java 7 + CDI + Jboss。这可能与某种接线或过滤器有关吗?
TIA。
【问题讨论】:
-
看看mockito:code.google.com/p/mockito
标签: java integration jboss7.x cdi stubbing