我们可以用场景作为我们度量的一个单元,或者将描述系统行为的每一个步骤作为一个特性。
We might use scenarios as the unit of measure or look at each step that describes system behavior as a feature.
应该遵循下面这条很好的原则:即只要您认为有必要对代码中的某个行为加注,就编写一个单元测试。
A good guideline to follow is to write a unit test whenever you feel the need to comment some behavior in the code.
单元测试常常需要测试有细微差异的代码行为,因此涉及到相似和重复的情况。
Unit tests often need to test nuanced behavior of the code under test, leading to similar and duplicated situations.
如果您像其他许多程序员一样不喜欢为代码加注,则单元测试是记录代码行为的一种方法。
If you're like many programmers who aren't fond of commenting code, unit tests are a way of documenting your code behavior.
对变化条件下的面板的行为进行良好的编码,这对光电单元的管理者会很有帮助,因为就给定的数据记录而言,它们可以形成观察的基线。
Good Numbers for the behavior of panels in varying conditions can be helpful to managers of photovoltaic units because, given the data record, they can form a baseline of observations.
然而,即使执行单元是一个线程,期望的事务管理器行为都是相同的。
However, the desired behavior of the transaction manager would be the same even if the unit of execution was a thread.
配给一个存储单元所需的时间根据请求的存储大小、类型和特定云环境(或数据中心)的当前行为而决定的。
The time needed to provision a storage unit varies by the size of the storage being requested, the type, and current activity of that particular cloud environment (or, the data center).
第二个选择是模拟验证行为并将测试类保留在单元目录中。
The second option is to mock out the validation behavior and leave the test in the unit directory.
设想,如果可以这样处理行为——假设您可以像设置其背景颜色那样轻松地将行为分配给一个表的单元格,比如是展开还是折叠,是突出显示还是滚动。
Imagine if you could do the same with behaviors — if you could just as easily assign behaviors to a table cell, like expand and collapse, highlight or scroll, as you could set its background color.
行为驱动开发则更进一步,通过使用自然语言,直接把单元测试(以及测试用例)同需求联系起来。
Behavior Driven Development goes further by directly associating unit tests (and test cases) with the requirements via the use of natural language.
如果没有匹配的odr路由规则,则默认行为是考虑单元中所有拥有匹配请求的URI模式的应用程序。
If there are no ODR routing rules, then the default behavior is to consider all the applications in the cell that have URI patterns which match the request.
跟其他单元测试一样,消费者测试可用于驱动开发活动:开发者创建服务行为,以满足测试的期望。
Much as any with other unit test, consumer tests can be used to drive development activities, with developers creating service behaviours to satisfy the tests' expectations.
使用容器管理的事务(CMT)提供了两个关键的优势(如果没有容器支持这几乎是不可能的):可组合的工作单元和健壮的事务行为。
Using container-managed transactions (CMTs) provides two key advantages that are nearly impossible to obtain without container support: composable units of work, and robust transactional behavior.
单元测试定义一个有关每个单元的行为的书面合同。
Unit testing defines a written contract about the behavior of each unit.
只要正在被测试的类的行为如所期望的那样,它将不会注意到差异,而单元测试会检查是否发出了正确的查询。
As long as the class being tested behaves as expected, it won't notice the difference, and the unit test can check that the proper query was emitted.
其中的一个方法是测量行为类似于针对某个点的单元,并记录辐射率温度读取器。
One way is to measure a cell that behaves similarly with a point and shoot emissivity temperature reader.
单元测试强调内部结构,例如逻辑和数据流,以及单元的功能和外部可见行为测试。
Unit testing addresses the internal structure, such as logic and dataflow, and the testing of functions and the externally visible behavior of the unit.
当回滚已迁移节点的子集或整个计算单元时,将出现回滚托管节点的行为。
The rollback of a managed node occurs when a subset of migrated nodes are rolled back, or when the entire cell is rolled back.
首先,我们以一种简单而一般的方式来处理方法句柄,这是将方法(任意的JVM方法)作为行为单元来管理的,这样他们就可以直接调用了(本来就应该这样)。
First, we factor out method handles as a simple and generic way of managing methods (arbitrary JVM methods) as units of behavior, which are (as methods should be) directly callable.
这个部分Jamie将给读者介绍行为驱动开发(BDD),同时他会解释BDD如何提高单元测试的有效性。
In this part Jamie introduces the reader to behavior driven development and explains how it can improve the effectiveness of unit testing.
如果没有匹配请求的odr路由规则,比如Request2这种情况,默认行为是考虑单元中的所有模块。
If there are no ODR routing rules that match the request, as is the case for request 2, the default behavior is to consider all modules in the cell.
一种隐式地指定行为的方法是使用以JUnit(请参阅参考资料)编写的单元测试。
One way to specify the behavior implicitly is to use unit tests written with JUnit (see Resources).
WSCI使用事务元素为Web服务行为建模,并且将一组行为作为一个工作单元。
WSCI USES a transaction element to model the behavior of a web service and treats a number of activities as a single unit of work.
Mockito真的不需要期望行为,这简化了单元测试。
Mockito really cleans up the unit test by not requiring expectations.
因此,重整浏览器可以潜在地利用一组单元测试来确定行为的重要方面。
Therefore, a refactoring browser could potentially leverage the unit test suite to determine what aspects of behavior are important.
全面的单元测试集能够轻松地检查行为是否正确,让开发人员能够专心地优化代码,而不必担心是否会破坏代码的正常行为。
A comprehensive set of unit tests makes it easy to verify the behavior, letting you freely play "what if" games with optimization without worrying that you've broken something.
而且如果你有了涉及应用程序其余部分的单元测试,你就可以保证你的添加已经不会改变其它地方的行为。
And if you have unit tests that cover the rest of your application, you can be sure that your additions have not changed the behavior elsewhere.
当你得到一个单元测试的异常或不一致行为时。
When you are getting unexpected or inconsistent behavior from a unit test.
指在一个社会单元中,人们对占据特定位置的个体所期望的一套行为模式。
A set of behavior patterns expected of someone occupying a given position in a social unit.
我们将行为教育、健康教育、励志教育分三个单元贯穿在我们教育活动的始终,让自主学习、合作学习成就每个孩子的智慧人生!
We will let the behavior education, the health education, the encourage education become the theme of this term and we will let the self-learning, cooperation-learning achieve each kids' wise life!
应用推荐