[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[jgit-dev] JGit unit tests could be more readable.
- From: Ketan Padegaonkar <ketanpadegaonkar@xxxxxxxxx>
- Date: Fri, 20 May 2011 06:23:45 +0530
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ZHkT+ebn9ImUuHgy7omI2zjRQpPeQUahBaamdiTPlpwJcd9udEii9TGAt53JtSIpqh qLG/wtJKk0Igg7+vJyAFf2bVGGqWIsGo6RnL8D7c7QJ0hSKJTx98LVpgNK/QvtKR4+H5 KsTNRdreE1hkn5PyV7x9f+TdQScyXLcgk72Ss=
As a recent contributor, I've found the JGit unit tests highly useful
as a safety-net when making changes. Thanks for the great work!
However I've found that a lot of the tests don't talk to me. Most of
the test names I've come across are of the form "testDoSomething".
They don't tell me what is expected when doSomething happens. Surely
there are assertions, but that raises another question that I then
need to understand what every assertion means, which sucks away my
time to have to understand the entire test which may not necessarily
interest me, and have to do the same with some other test.
May I suggest that going ahead the tests be written in the form
"testDoingSomethingShouldRaiseError". This ensures that reading the
testname clearly conveys what is expected of the test.
studios.thoughtworks.com | twitter.com/ketanpkr | eclipse.org/swtbot