Whether or not to accurately test the 18th conditional in a long method is a matter of judgment.
是否真的要测试长方法中的第18个条件,是个判断问题。
The highlighted section in Listing 7 shows a small portion of an example of a long method code smell.
清单7中高亮显示的部分展示了一个长方法代码味道示例的一小部分。
In this example, the long method has been broken into smaller methods that each do one thing and do it well.
在这个示例中,将一个很长的方法分解为几个短方法,并且让每个短方法负责一件事情。
In his book, Refactoring, Martin Fowler describes the issue with the long Method code smell quite nicely as "the longer a procedure is, the more difficult it is to understand."
MartinFowler在他撰写的Refactoring这本书中,对代码中存在冗长方法的气味这个问题做了精妙的描述——过程越长,越难理解。
Grouping numerous blocks of logic in one long method can very quickly cloud the overall intention of the method, however, because few people can effectively handle such a large dataset.
但是,在一个长方法(long method)中分组数量众多的逻辑块可能会让人很快忘记该方法的总体意图,因为很少有人可以有效处理这样一个大的数据集。
I found people say this error might happen when I have very long method names, but this does not seem to apply here because I don't have long methods names and I don't generate code myself.
我发现人们说这个错误可能发生当我有很长的方法名,但这似乎并不适用,因为我没有长方法名称和我自己不生成代码。
Revenue of long-term project contract shall be reasonably recognized, according to the completed contract method.
长期工程合同收入按已完成的合同方式进行合理确认。
But what you really want for the long run is a method that is accessible from all the test scripts that you write.
但是从长远角度来看,您实际想要的是一种可以从编写的所有测试脚本进行访问的方法。
When a method is too long to be viewed all at once in a window, it decreases in understandability because you can't quickly follow its entire flow from beginning to end.
如果方法过长,不能在一个窗口中一次看完,那么它就变得不容易理解,因为您不能快速地从头到尾了解它的整个思路。
While this method isn't near as much fun as the natural method, it will keep her living a long and wonderful life.
尽管这个方法不像大自然的方法那么生意盎然,但是将使得她过上长时间的安稳生活。
This method provides smooth animations that actually last as long as you specify.
该方法可以提供规定的任意长时间的平滑动画。
For particularly long cables, the figure 8 method works marvelously and it's easy to learn, unlike those knots you struggled with in Boys Scouts.
对于很长的耳机线,8字型法特别有效,并很容易学习,不像在童子军时学的打那么复杂的结。
The method has long been used by horticulturalists to propagate plants, particularly finicky flora like orchids.In the case of the redwoods, Mr.
这种方法长久以来为园艺家用来繁殖植物,尤其是像兰花这种非常挑剔的植物。
The method has long been used by horticulturalists to propagate plants, particularly finicky flora like orchids. In the case of the redwoods, Mr.
事实上,园艺师们在很早以前就开始利用这种方法来繁殖植株,尤其是像兰花这样比较难伺候的植物。
Now, in any text input box, long-press and select input Method in the popup.
现在,在任何文本输入框中,长按并在弹出框中选择输入法。
If a method is 10 lines long and 8 lines of the method were exercised in a test run, then the method has a line coverage of 80%.
如果一个方法有10行代码,其中的8行在测试中被执行,那么这个方法的行覆盖率是80%。
These methods are almost always overloaded with an int/TimeUnit pair, indicating how long the method should wait before bailing out and returning control to the program.
这些方法几乎总是包含一个int/TimeUnit 对,指示这些方法应该等待多长时间才释放控制权并将其返回给程序。
Additional blocks of code after the run method may be required to handle long running reports.
可能需要run方法后的其他代码块处理长期运行的报告。
Bayeux implementations support a specific HTTP method called long polling.
Bayeux实现支持一种名为长轮询的特定HTTP方法。
As the second parameter of the method with long type.
声明为方法的第二个参数,类型为long。
These mocks can be configured for any purpose, ranging from simple dummy arguments for filling out a method signature to multi-invocation spies that verify a long sequence of method calls.
可以针对任何用途配置这些mock,从方法签名中的简单哑参数到检验一系列方法调用的多调用测试。
You can throw any kind of exception you like - checked, runtime, or error - as long as the method signature supports it.
可以抛出您需要的任何类型的异常(已检查、运行时或错误),只要方法签名支持它即可。
So long as method names match, you have polymorphism.
只要方法名匹配,就可以利用多态性。
We were teaching you this method with all these principles and presuppositions all semester long.
我们一整个学期都在教给你们这种方法,及所有这些原则和假定。
As long as there are method executions against objects the class USES, simple mock expectations are sufficient to test those executions.
只要有针对类使用的对象的方法执行,简单的模拟期望就足以测试那些执行。
The verifier may also obtain the digested content in another method so long as the digest verifies it.
验证者还可能以另一种方法获得已摘录的内容,祇要摘要验证这种方法。
This means that a test can be violated temporarily during the method, as long as the conditions are satisfied when it completes.
这意味着可以在方法中临时地违反测试,只要在方法完成的时候满足条件即可。
This method of calling services allows you to begin the long-running process on the server side.
调用服务的这种方法允许您在服务器端开始长期运行的进程。
This flag allows the runtime to execute the type constructor method at any time it chooses, as long as the method executes before the first access to a static field for the type.
此标志使得运行库能够在任何时候执行类型构造函数方法,只要该方法在第一次访问该类型的静态字段之前执行即可。
Evaluate the possibility of refactoring the method to reduce any long-term maintenance issues.
评估重构方法减少任何长期维护问题的可能性。
应用推荐