The attitude is basically: 'I already have little to lose, so why don't I mock myself for fun?'
从根本上讲,他们的态度是:‘我已是一穷二白,为何不自嘲取乐呢?’
First, I need to mock up a description of what I might want to say about the data in Listing 2.
首先,对于清单2中的数据,我需要模拟出一个描述,记录下对于这些数据我可能要说的内容。
"Well, I can't show it you myself," the Mock Turtle said, "I'm too stiff."
“噢,我不能亲自给你看,”假海龟说,“我太僵硬了。”
"Once," said the Mock Turtle at last, with a deep sigh, "I was a real Turtle."
最后,假海龟终于开口了,它深深地叹了口气,说:“以前,我是一只真海龟。”
Specifically, I want to offer some tips on how easy it can be to write unit tests with mock objects.
特别地,我想提供一些技巧来说明编写带有模拟对象的单元测试是多么容易。
It's one of the paradoxes I enjoy in my brain that I think in all probability there is life on other planets, while at the same time being more than happy to mock anyone who claims to have met it.
我一方面认为多半在其他星球上存在生命,另一方面更加乐于嘲笑那些声称碰到过外星生物的人,这是我脑中的矛盾想法之一。
For performance tests of the data binding frameworks, I generated documents containing mock airline flight timetable information.
为了对数据绑定框架进行性能测试,我生成了包含模拟的航班时刻表信息的文档。
I create two mock objects for this project to simulate the GPS device and the UI, respectively.
我为此项目创建了两个模拟对象,分别模拟GPS设备和UI。
I hope that you see the benefits of using mock objects in unit testing. I also hope this brief tutorial helps you see how to create mock objects easily.
我希望你们能够发现在单元测试中使用模拟对象的益处,也希望这篇简短的指南能够帮您了解如何简单地创建模拟对象。
It is capped with a mock-up of the Ares I second stage, Orion capsule and launch abort system.
它的顶端装着模拟的战神一号第二节、猎户星座太空舱和发射中止系统。
Notice that I just mock up some flight data in a HashMap rather than setting up the full MVC infrastructure.
注意我仅仅模仿了HashMap中的一些机载数据,而不是设置完整的MVC基础设施。
The documents I used for performance tests contain mock airline flight timetable information. Here's a sample document so you can get a feeling for the structure
用于性能测试的文档包含模拟航班时刻表的信息。
"The purpose of the letter was to mock those views and point out how ludicrous they are, " Sterr said. "I have always loved the kids, and I believe they know it.
“这封信的目的主要是嘲弄那些观点并指出它们有多么的荒谬,”Sterr说道,“我一直喜欢孩子们,我相信他们知道。
"I want to know what you're thinking on one of the most important questions of this campaign," Clinton said in a mock-serious tone during the initial video.
希拉里在最初那个视频中以一种故作严肃的口气说:“我想知道你们大家对本次竞选最重要的一个问题——竞选主题曲怎么看。”
And Zedekiah the king said unto Jeremiah, I am afraid of the Jews that are fallen to the Chaldeans, lest they deliver me into their hand, and they mock me.
西底家王对耶利米说,我怕那些投降迦勒底人的犹大人,恐怕迦勒底人将我交在他们手中,他们戏弄我。
Mock objects are so fundamental to the way that I think about DAOs that I couldn't imagine implementing one without the other.
在我考虑DAO的方式中,模仿对象是很基本的,以致我无法想象在缺少其中一个的情况下如何实现另一个。
Mock objects have gotten a lot of publicity lately, but I think they're overused and often too heavy to be practical.
最近模仿对象得到了大力推广,但我认为它们被滥用了,它们太“重”以至于不切实际。
I could have written a several page description, including mock ups, for the report specification of Figure 4. What would that work achieve?
我能够为图4的报告说明撰写许多页的描述,包括实体模型。该工作怎样实现?
I studied the briefing book diligently and participated in several mock-debate sessions.
我仔细研究简报记录,参加了几次模拟辩论。
In this final section, I introduce a term I invented to describe a type of test helper that is useful in writing aspect tests: mock targets.
在最后一节中,我介绍了我自己发明的、用于描述在编写方面测试时用到的一种测试helper类类型的术语:mock目标。
And even if it did by some miracle return ExchangeRate, what happens when I need to mock an instance of a different interface?
即使它能够通过某种奇迹返回ExchangeRate,但是如果需要模拟另一个接口的实例,又会怎么样呢?
Now that the mock is prepared, I pass it as an argument to the method under test.
现在mock准备好了,我把它作为参数传递给要测试的方法。
I then tried out the concept on my then-7-year-old son, Philip, using my mock-up.
然后,我使用这个模型在我7岁的儿子菲利普身上尝试这个概念。
I’m a professional, I can mock that, I don’t need kindergarten level help running this!
我很职业,我可以mock这些东西,不需要像幼儿园的小朋友一样手把手地教我怎么做!
I can establish my expectations for each interaction between the controller and the mock user.
可以为控制器和mock用户之间的每个交互建立预期。
'no,' said Alice. 'I don't even know what a Mock Turtle is.'
“没有,”爱丽丝说,“我还不知道素甲鱼是什么东西呢!”
'no,' said Alice. 'I don't even know what a Mock Turtle is.'
“没有,”爱丽丝说,“我还不知道素甲鱼是什么东西呢!”
应用推荐