The idea is that in a boot-like place (the main method?) it is populated with appropriate instances for the service names, and that unit tests can program it with a mix of real and mock instances.
其思想是在程序的入口(main方法?) ,把与服务名对应的实例填充进服务定位器,单元测试的时候可以混合使用真实或模拟的实例来填充。
The idea is that in a boot-like place (the main method?) it is populated with appropriate instances for the service names, and that unit tests can program it with a mix of real and mock instances.
其思想是在程序的入口(main方法?) ,把与服务名对应的实例填充进服务定位器,单元测试的时候可以混合使用真实或模拟的实例来填充。
应用推荐