Permalink
Browse files

tweaks before class:

- fixed OrderItem example (was missing code that moved into a lab)
- renamed to index.html
- added groovy to course menu
  • Loading branch information...
1 parent defd9e4 commit 953816d2585f215a5dade7f93f32549ad1a5043f @stuarthalloway stuarthalloway committed Jul 20, 2008
@@ -1,7 +1,7 @@
package groovy.mocking
import groovy.GroovyOrderItem
-import examples.mocking.OrderItem
+import groovy.OrderItem
class GroovyOrderItemTest extends GroovyTestCase {
def testEmptyOrderItem() {
@@ -1,6 +1,6 @@
package groovy;
-import examples.mocking.OrderItem;
+import groovy.OrderItem;
public class GroovyOrder {
def orderItems = []
@@ -1,6 +1,6 @@
package groovy
-import examples.mocking.OrderItem
+import groovy.OrderItem
class GroovyOrderItem implements OrderItem {
int cost
@@ -0,0 +1,6 @@
+package groovy;
+
+public interface OrderItem {
+ int cost();
+ String display();
+}
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -82,11 +82,6 @@
<li><a href="labs/tdd">TDD</a>: TDD for Pizza shop</li>
</ul>
- <h3>Solutions:</h3>
-
- <ul>
- <li><a href="labs/tdd/solution">Solution project</a></li>
- </ul>
</div>
<div class="all bdd">
@@ -110,6 +105,7 @@
<h3>Reading</h3>
<ul>
+ <li>Glover, Andrew. <a href="http://www.ibm.com/developerworks/java/library/j-cq01316/">In pursuite of code quality: Don't be fooled by the coverage report.</a></li>
<li>Rudolph, Jason. <a href="http://jasonrudolph.com/blog/2008/06/10/a-brief-discussion-of-code-coverage-types/">A Brief Discussion of Code Coverage Types</a>. Understand the different types of code coverage, and how you can use them <em>in conjunction with</em> other techniques to improve your tests.</li>
</ul>
@@ -126,15 +122,17 @@
<li><a href="labs/cobertura">Cobertura</a>: Coverage lab</li>
</ul>
- <h3>Solutions</h3>
-
- <ul>
- <li><a href="labs/cobertura/solution">Solution project</a></li>
- </ul>
</div>
<div class="all refactoring">
<h2>Refactoring</h2>
+ <h3>Reading</h3>
+
+ <ul>
+ <li>Shore, James. <a href="http://jamesshore.com/Blog/Red-Green-Refactor.html">Red-Green-Refactor</a>: simple and powerful.
+ <li>Wikipedia. <a href="http://c2.com/cgi/wiki?RefactorMercilessly">Refactor Mercilessly</a>: works espeically well if you test relentlessly, integrate continuously, and do the simplest thing that could possibly work.</a></li>
+ </ul>
+
<h3>Examples</h3>
<ul>
@@ -149,11 +147,6 @@
<li><a href="labs/refactoring">Refactoring</a>: Refactoring the Pizza and Order classes</li>
</ul>
- <h3>Solutions</h3>
-
- <ul>
- <li><a href="labs/refactoring/solution">Solution project</a></li>
- </ul>
</div>
<div class="all mocking">
@@ -177,20 +170,27 @@
<li><a href="labs/mocking">Mocking</a>: Mocking OrderItem</li>
</ul>
- <h3>Solutions</h3>
-
- <ul>
- <li><a href="labs/mocking/solution">Solution project</a></li>
- </ul>
</body>
</div>
+ <div class="all groovy">
+ <h2>Groovy</h2>
+
+ <h3>Reading</h3>
+
+ <ul>
+ <li>Almiray, Andres <a href="http://groovy.dzone.com/news/follow-writing-unit-tests-usin">Follow up on Writing unit tests using Groovy</a>. Continuing where Malmsten left off, shows how to use builders to create test data.</li>
+ <li>Malmsten, Thomas <a href="http://groovy.dzone.com/news/writing-unit-tests-using-groov">Writing unit tests using Groovy</a>. Groovy is a much easier language to work in than Java.</li>
+ </ul>
+ </div>
+
<div class="all refactotum">
<h2>Refactotum</h2>
<h3>Reading</h3>
<ul>
<li>Fields, Jay <a href="http://blog.jayfields.com/2008/06/developer-testing-and-importance-of.html">Developer Testing and the Importance of Context</a>. Links to about a dozen articles that Jay has written about testing. Read each, and consider how/whether they would apply on your project.</li>
+ <li>Rudoplh, Jason. <a href="http://jasonrudolph.com/blog/2008/02/24/refactotum-2gx-edition/">Refactotum: 2GX Edition:</a> With good testing habits, you can quickly make a positive impact, even on an unfamiliar codebase.</li>
<li>Rudolph, Jason. <a href="http://jasonrudolph.com/blog/2008/06/17/testing-anti-patterns-incidental-coverage/">Testing Anti-Patterns: Incidental Coverage</a>. Code coverage can go wrong: lines of code are encountered, but not tested in any meaningful way.</li>
<li>Rudolph, Jason. <a href="http://jasonrudolph.com/blog/2008/07/01/testing-anti-patterns-overspecification/">Testing Anti-Patterns: Overspecification</a>. You can have too much testing. If tests specify details irrelevant to the real purpose of the code, they make it unnecessarily difficult to refactor the code in the future.</li>
<li>Rudolph, Jason. <a href="http://jasonrudolph.com/blog/2008/07/08/testing-anti-patterns-underspecification/">Testing Anti-Patterns: Underspecification</a>. Tests often do too little, and cover only part of the behavior. It is impossible to test every case, but it is critical that you develop a sense for testing boundary cases.</li>
@@ -201,14 +201,13 @@
<h2>Additional Reading</h2>
<ul>
- <li>Almiray, Andres <a href="http://groovy.dzone.com/news/follow-writing-unit-tests-usin">Follow up on Writing unit tests using Groovy</a>. Continuing where Malmsten left off, shows how to use builders to create test data.</li>
<li>Beust, Cedric. <a href="http://beust.com/weblog/archives/000077.html">Don't Call Super</a>. It can be difficult to reuse code across JUnit test cases. Inheritance more than one-deep from TestCase is fragile and error-prone.</li>
<li>Beust, Cedric. <a href="http://www.beust.com/weblog/archives/000170.html">Using annotation inheritance for testing</a>. You might want to explicitly state dependencies between tests, and how to do it in TestNG.</li>
<li>Jeffries, Ron. <a href="http://www.xprogramming.com/software.htm">(Software Download Page)</a>. Descriptions and download links for testing tools in a variety of languages.</li>
- <li>Malmsten, Thomas <a href="http://groovy.dzone.com/news/writing-unit-tests-using-groov">Writing unit tests using Groovy</a>. Groovy is a much easier language to work in than Java.</li>
</ul>
</div>
+ <div class="all books">
<div class="body"></div>
@@ -239,6 +238,7 @@
<li id="choose_coverage">Code Coverage</li>
<li id="choose_refactoring">Refactoring</li>
<li id="choose_mocking">Mocking</li>
+ <li id="choose_groovy">Groovy</li>
<li id="choose_refactotum">Refactotum</li>
<li id="choose_additional">Additional Resources</li>
</ul>
@@ -248,7 +248,6 @@
</div>
</div>
- <div class="spacer">&nbsp;</div>
</div>
@@ -1,6 +1,6 @@
Event.observe(window, "load", function() {
$A(["all", "why", "tdd", "bdd", "coverage", "refactoring",
- "mocking", "refactotum", "additional" ]).each(function(elem) {
+ "mocking", "groovy", "refactotum", "additional" ]).each(function(elem) {
Event.observe($("choose_" + elem), "click", function() {
$$(".all").each(function(item) {item.hide();});
$$("." + elem).each(function(item) {item.show();});

0 comments on commit 953816d

Please sign in to comment.