依赖注入工作台通过实现一个模拟实现服务成为服务注入到魔兽世界黄金被测试单元测试。
Dependency injection bolsters unit testing by enabling a mock implementation of a service to be world of warcraft gold injected into the service being tested.
既然它们已经被定义完毕,我们不妨来实施单元测试来执行函数及小部件以确保它们能像预期的那样运行。
Now that they have been defined, it would be great to implement unit tests that exercise the functions and the widgets to confirm they behave as expected.
如果是这样,不是单元测试有问题,就是被测试的代码不正确。
In these cases, either the unit test or the code to be tested is most likely incorrect.
不管使用什么编程语言和平台,编写单元测试都是被广为接受的技术实践,以便交付易于维护的代码。
In any programming language and platform, having a set of well-though unit tests, is a commonly accepted practice in order to deliver maintainable code.
对被测试的单元自动生成测试。
单元测试对于一个开发人员来说仅仅是编写代码的问题,它只发挥了被测试代码中一个很小且很特殊部分的功能。
Unit testing is a piece of code written by a developer that exercises a very small, specific area of functionality of the code being tested.
单元测试人员访问实际用例之外的,与被分解的信息相沟通的工件是十分重要的。
It is very important the unit tester has access to artifacts that communicate decomposed information, outside of the actual use case.
将单元测试与被测试的相关类放在同一个包内。
Put the unit tests in the same package as the associated classes being tested.
只有一少部分地实际用例被直接输入道单元测试用例中。
Only a small portion of the actual use case serves as direct input to a unit test case.
单元测试总是在代码被分发检查之前被执行。
Unit tests were always performed (and results logged) before code was distributed for review.
对单元测试的小的变化将要求我们重新检查代码以确保完全的覆盖率被维护。
Small changes to the unit tests would require us to audit the code again to ensure that full coverage had been maintained.
反复运行的脚本和可测试的任务使您能够了解到某个单元中发生的改变可以被传递到其他单元。
Scripts that perform repeatable and test-able tasks provide confidence in knowing that changes made in one cell can be propagated to the other cells.
由于代码可以被某一个方面所改变,在一个类上可以完美运行的单元测试当这个类被集成入一个AOP系统中可能会出现完全不同的运行状况。
Because code may be changed by an aspect, unit tests that run perfectly on a class may behave quite differently when the class is integrated into an AOP system.
把测试案例和被测试的程序代码放在同一个单元里面。
一些资源提供了对于团队来说在定义角色和单元测试规范的样子的有用的信息被列在本文后面的“参考资料”。
Some resources that provided useful information for the team in defining the role and appearance of unit test specifications are listed later under "References and Related resources."
模拟对象被TimMackinnon、Steve Freeman和PhilipCraig1所支持并成为单元测试工具箱的主要组成部分。
Mock objects were championed by Tim Mackinnon, Steve Freeman, and Philip Craig 1 and have become a staple in the unit testing toolbox.
如果单元测试案例因为应用程序中的错误或缺少单元测试代码而无法被成功完成,那么应用程序不应该被性能测试所接受。
If the unit test cases cannot be successfully completed, either due to bugs in the application or the lack of unit test code, then the application should not be accepted for performance testing.
在基本单元测试完成之前,开发者可以为这个构建指定一个晋升水平,当然也有可能被否决。
Before unit testing is finished, developers can specify a promotion level for the build, with REJECTED obviously being one of the choices.
我们多数的开发人员在他们拥有一个能够被测试的软件单元不久就开始编写单元测试。
Most of our developers started writing unit tests as soon they had a software unit that could conceivably be tested.
在完成了代码和单元测试之上,开发人员要为同级评审过程(后面被描述)组装一个评审包并等候反馈。
Upon completing the code and the unit tests, the developer assembled a review package for the peer review process (described later) and awaited feedback.
单元测试脚本是可配置管理的,以便对测试脚本的变更可以被跟踪。
The unit test scripts were configuration-managed so that changes to them could be tracked.
单元测试已作为软件开发的“最佳实践”被普遍接受。
Unit testing has become widely accepted as a "best practice" for software development.
此外,通过提供被注入对象的存根实现、改进测试覆盖率和代码质量,可轻松对编写良好的应用程序类执行单元测试。
Furthermore, well-written application classes can easily be unit tested by providing stub implementations of the injected objects, improving test coverage and code quality.
我为我的任务库创建了一些单元测试,以保证任务可以被正确地创建出来,并且以测试驱动重构迈开第一步。
I created some unit tests for my task library to ensure tasks were being created properly and begun some test-driven refactoring.
在每个被加载的窗口中,所有的单元测试函数都会被调用到。
Within each loaded window all unit test functions are invoked.
下面是一个例子:在邮件应用程序中发现一个内存泄漏,当该泄漏被处理后,我希望确定在以后的代码改变中不会再发生该问题,于是为此构建了一个单元测试。
Once the leak was fixed, I wanted to make sure the problem wasn't reintroduced in later code changes, so I built a unit test to help prevent this. It's a resource usage unit test, shown in Listing 1.
结果,您会看到对容易测试(equals和toString往往很突出,参见清单1)的内容进行多次的测试,而被测单元的真正逻辑却被忽略了。
As a result, you see lots of tests for things that are easy to test (equals and toString tend to pop out; see Listing 1), and the real logic of the unit under test is ignored.
每一个地质区域包含厚于3千米的地层。评估单元——可测绘的普通地理特征岩量——被分区测试,按质量评估油气潜力。
Assessment units (AUs)—mappable volumes of rock with common geologic traits—were identified within each province and quantitatively assessed for petroleum potential.
通过这种方式,我写的每一个测试被添加到测试单元中。
微波开关矩阵主要是实现自动测试系统与被测电路单元之间的信息交换,以及为被测单元提供必要的负载。
The microwave switching matrix is to exchange messages between ATS and the circuit units under test, and to provide necessary load for these units.
应用推荐