Write code before you write a test.
在编写测试前编写代码。
Before you start fixing it, write a test.
修复它之前,首先编写一个测试。
Just write a test and get it to pass.
仅仅编写测试,使它通过。
编写一个测试。
编写一个测试。
Write a test that the code in Listing 3 will pass.
写出清单3中的代码要通过的一个测试。
So the next step is to write a test for this method.
所以下一步就是为这个方法编写一个测试。
All this theory is great, but how do you write a test first?
整个理论很棒,但如何先编写测试呢?
How can you write a test for something that doesn't exist yet?
如何为尚不存在的代码编写测试呢?
In rare cases, don't write a test at all and come back to it later.
在很少情况下,根本不编写测试,放到后面编写。
Next, you will write a test case for the Address_To_AddressCSV data map.
下一步,您将为Address_To_AddressCSV数据映射编写测试用例。
Instead, write a test, then write just enough code to get that test to pass.
相反,您只需编写测试,然后编写足够的代码使其能通过测试。
In other words, write a test that exercises the code you are about to write.
换句话说,写一个将您要撰写的代码的测试。
In some rare instances, I just can't figure out how to write a test at all.
在少数情况下,我恰好根本想不出如何编写测试。
Even though I haven't written a lick of code yet, it's time to write a test.
即使我还没有编写一丁点代码,但也该编写测试了。
If I find I can't write a test first after trying to do so, I back into the test.
如果发现在尝试先编写测试之后,仍不能先编写测试,那么回到测试中来。
When fixing a bug, first write a test that fails because of it, then fix the bug.
当修正bug的时候,先要写一个能针对它的测试,然后再修复bug。
You just write a test class (TC_Person in this example) that subclasses TestCase.
您只是写了一个测试类(在该示例是tC _ Person),它是TestCase的子类。
Continuous Testing: Before programmers add a feature, they write a test for it.
连续测试:在程序员增加一项特征前就完成测试程序。
Every time you write new code, add a test, and every time you fix a bug, write a test.
每次编写新代码时,添加一个测试,每次修复一个bug时,编写一个测试。
The mantra for coding TDD is: "What is the simplest thing for which I can write a test?"
编写TDD的信条是:“可以为其编写测试的最简单内容是什么?”
Accordingly, I can write a test case to verify XMLUnit's behavior, as shown in Listing 6.
相应地,我可以编写测试用例来验证XMLUnit的行为,如清单6所示。
Write a test for the withdraw() method on Account. Your test should now look like Listing 6
为Account 的withdraw()方法编写一个测试。
NUnit lets you write a test case in the same language and environment as your application.
Nunit允许你用与应用程序相同的语言和环境来写测试用例。
JUnit has a bit of this pattern language approach, because it can help you write a test case.
JUNIT使用了一点模式语言的方法,因为它能帮你写一个测试用例。
When we find bugs, we write a test case to expose the bug and add it to the suite prior to fixing it.
当我们发现错误时,我们编写测试案例来找到错误并在修正此错误之前将其添加到套件中。
The first thing to do is write a test for the simplest possible transfer behavior, such as the code in Listing 4.
我们要做的第一件事就是为最简单的转帐行为写一个测试,比如清单4中的代码。
The first thing to do is write a test for the simplest possible transfer behavior, such as the code in Listing 4.
我们要做的第一件事就是为最简单的转帐行为写一个测试,比如清单4中的代码。
应用推荐