TDD With Groovy
     Matt Taylor
Test Driven Development

Write test first
Write code to pass test (and nothing else!)
Refactor


    Repeat until functiona...
Emergent Design


Write tests as if the perfect API already exists
Think of yourself as an excavating archeologist
Groovy

Dynamic typing
Closures
Meta Object Protocol (MOP)
Groovy example
def list1 = (1..100).findAll {
    it % 5 == 0
}
def list2 = list1.collect { it * 10 }
println list2.join(‘...
Groovy example
def list1 = (1..100).findAll {
    it % 5 == 0
}
def list2 = list1.collect { it * 10 }
println list2.join(‘...
ENOUGH SLIDES!
  Bring on the CODE
Resources




http://github.com/rhyolight/groovy-unitconverter
http://www.gatewaygroovy.org
Matt Taylor

matthew.taylor@dangertree.net
http://dangertree.net
http://www.linkedin.com/in/mattspratt
http://twitter.com/...
Tdd With Groovy
Tdd With Groovy
Tdd With Groovy
Tdd With Groovy
Tdd With Groovy
Tdd With Groovy
Tdd With Groovy
Tdd With Groovy
Upcoming SlideShare
Loading in …5
×

Tdd With Groovy

3,067 views

Published on

Slides for a presentation at the STLJUG, June 11.

Published in: Technology, Design
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,067
On SlideShare
0
From Embeds
0
Number of Embeds
367
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

















  • Tdd With Groovy

    1. 1. TDD With Groovy Matt Taylor
    2. 2. Test Driven Development Write test first Write code to pass test (and nothing else!) Refactor Repeat until functionality has been achieved
    3. 3. Emergent Design Write tests as if the perfect API already exists Think of yourself as an excavating archeologist
    4. 4. Groovy Dynamic typing Closures Meta Object Protocol (MOP)
    5. 5. Groovy example def list1 = (1..100).findAll { it % 5 == 0 } def list2 = list1.collect { it * 10 } println list2.join(‘, ’)
    6. 6. Groovy example def list1 = (1..100).findAll { it % 5 == 0 } def list2 = list1.collect { it * 10 } println list2.join(‘, ’) prints: 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000
    7. 7. ENOUGH SLIDES! Bring on the CODE
    8. 8. Resources http://github.com/rhyolight/groovy-unitconverter http://www.gatewaygroovy.org
    9. 9. Matt Taylor matthew.taylor@dangertree.net http://dangertree.net http://www.linkedin.com/in/mattspratt http://twitter.com/rhyolight

    ×