Specifically, I want to offer some tips on how easy it can be to write unit tests with mock objects.
特别地,我想提供一些技巧来说明编写带有模拟对象的单元测试是多么容易。
While this pattern is very effective for many cases, sometimes the mock object cannot be passed into the object being tested.
虽然这种模式对于许多情况都非常有效,但模仿对象有时不能被传递到正在测试的对象。
IF the consequences were not so serious, it would be tempting to mock the fiascos and flip-flops of America's intelligence services.
如果不是结果如此严肃的话,人们还以为这是一次对美国情报部门颠三倒四和接连失败的嘲弄。
Never mock or belittle your clients, and always keep what is supposed to be confidential, confidential.
绝对不要嘲弄或者贬低你的客户,并且最好保持一贯的信任态度,信任。
It describes the mock system objects you can use, provides tips for designing providers so that they can be tested, and lists provider-specific features you should test.
这一章介绍了你可以使用的模拟系统对象,给出了设计内容提供者的相关建议以便他们能被测试,并且列出了你应该测试的提供者功能。
And in mock trials, people with baby faces are more likely to be found innocent than people like Ben Affleck, who do not have baby faces.
在模拟法庭,拥有娃娃脸的人比像本·阿弗莱克的人,更易被判定无罪,他没有娃娃脸。
The layer is well aware of the database, so neither mock objects nor POJT techniques should be applied.
该层对数据库非常敏感,所以该层不能应用模仿对象或POJT技术。
Their mission will be to support combat operations as an artillery battalion. (Logan Mock-Bunting/Getty Images)
他们的任务是支援一个炮兵营的作战。
Web services introduce additional situations where usage of mock approach can be very useful.
WebService引入了一些额外的场景,非常适于使用模仿方式。
You'll also be using the iPhone development plug-in, which provides a mock iPhone screen for you to preview your development in an iPhone-size viewport.
您还将使用iPhone开发插件,该插件将为您提供一个模拟的 iPhone屏幕以在 iPhone 大小的视窗中预览开发。
It can be treated just like a mock object. For example, the size method can be stubbed out.
它可被看作一个mock对象。
We will be using these later in our second mock object implementation.
稍后我们将在第二个模拟对象实现中使用它们。
This would be a miserable UI for the real program, of course, but this is just a mock-up.
对于实际的程序来说,这可能是一个糟糕的UI,但是,这当然只是一个模型而已。
Six would-be astronauts will this week begin a 520-day mock space voyage to simulate a mission to Mars. How will they cope with the huge psychological pressures?
即将成为宇航员的六人将于这周开始进行长达520天的模仿火星任务的模拟太空航行。他们将如何应付巨大的心理压力呢?
The mock object classes we have can be reused and enhanced for future tests with minimal effort.
已有的模拟对象类可以再度使用,稍做修改就可以用于未来的测试。
Six would-be astronauts will this week begin a 520-day mock space voyage to simulate a mission to Mars.
即将成为宇航员的六人将于这周开始进行长达520天的模仿火星任务的模拟太空航行。
Changing the tests means that the service mocks now don't pass the tests, so they must be changed as well to accurately mock the way the service now works.
更改测试意味着服务模拟现在将不能通过测试,因此也必须对其进行更改,以实际模拟服务现在的工作方式。
Mock objects have gotten a lot of publicity lately, but I think they're overused and often too heavy to be practical.
最近模仿对象得到了大力推广,但我认为它们被滥用了,它们太“重”以至于不切实际。
Peter continues to be degraded for failing to take more than a few steps across a churning sea but I've yet to hear somebody mock the dudes who stayed in the boat.
彼得仍然因为没能在翻腾的海面上多走上几步而被大家诟病,然而我从未听过有人嘲讽那些留在船上的人们。
You should be able to quickly generate UI mock-ups that display and communicate system behavior, look and feel, and critical new or risky aspects of the interface.
您应该能够快速地生成ui原型,该模型显示并表达了系统行为、外观、以及接口的新的或危险的方面。
Having two users is even better, but the second one can be on call for doing things like checking out live prototypes and mock-ups.
有两名用户就更好了,但是,第二名用户不必在现场,只需检查所设计的原型和模型即可。
Mock speculates that car interiors might not be suitably designed for heavy people.
莫克推测,汽车的内部设计或许不适合于胖人。
The rules have yet to be finalised, but the vehicles which make it to the final event will be required to complete a 60-mile run through a mock urban environment in less than six hours.
规则还没有最终完成,但进入决赛的车辆必须在六小时内完成60英里长的模拟城市环境的赛程。
If they didn't, the browser's XML parser would be considered "non-conforming" and people would mock it mercilessly before marking it as horrifically broken for Ajax.
如果某个浏览器不能正确处理,那么人们将认为该浏览器的xml解析器“不规范”,无情地嘲笑它,然后给它贴上“肆意破坏Ajax规范”的标签。
For example, when you save a domain class to a mock table, the id field is populated as it would be in a live application.
例如,当您将一个域类保存到模拟表在中时,会像在实际应用程序中一样填充id字段。
If you use singleton aspects (the default), any change you make to an aspect's fields, such as replacing one with a mock, must be undone at the end of the test.
如果使用单元素方面(默认的),那么对于方面的字段所做的所有改变,如用mock替换一个字段,在测试结束时都必须撤销。
The data files must be located in the mock Customer project so that they can be picked up from the class loader.
数据文件必须位于模拟Customer项目中,以便可以从类加载器中加载它们。
Doing what you believe to be right, even if others mock or criticize you for it.
做你相信是对的事情,不论别人怎么批评和嘲笑。
A mock service can then be used if the original service for any reason is unavailable.
如果原始服务出于任意原因而不可用,就可使用Mock服务。
IRise server, installs a mini application server. This module can be used to publish mock-ups of applications for dozens of users to try.
iRise服务器安装一个迷你应用服务器,这个模块可以用于生成可容多个用户试用的应用原型。
应用推荐