Functional BDD at Cuke Up

903 views

Published on

Functional BDD talk demonstrating the TickSpec .Net framework at the Cuke Up (Cucumber) conference

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
903
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Functional BDD at Cuke Up

  1. 1. Functional BDD<br />Phillip Trelford 2011<br />http://trelford.com/blog<br />@ptrelford<br />
  2. 2. First Steps in BDD on .Net<br />
  3. 3. Look no hands<br />
  4. 4. Look no hands<br />
  5. 5. TickSpec Design Goals<br />Platform for Innovation<br />Lightweight Flexible Framework<br />Extensible Parser<br />Support & Leverage F#<br />Tick methods<br />Modules<br />Active Patterns<br />Support major test frameworks<br />NUnit, xUnit, MbUnit<br />Silverlight Unit Test<br />
  6. 6. Inception<br /><200 lines of code<br />Parser<br />Regular Expressions<br />Given, When, Then<br />And or But<br />Runner<br />Reflection<br />Attributed methods<br />Monday<br />August<br />30<br />2010<br />
  7. 7. TickSpec<br />
  8. 8. F#<br />Strongly Typed<br />Functional<br />Object Orientated<br />Open Source<br />.Net language<br />In Visual Studio<br />
  9. 9. Syntax<br />let x = 1<br />letadd (lhs,rhs) = lhs + rhs<br />[1;2;3;4] |> List.iter<br />(fun item ->puts item)<br />raise (Exception("Bang"))<br />x =1<br />defadd(lhs,rhs) lhs +rhsend<br />[1,2,3,4].each <br />{|item| puts item}<br />raise 'Bang'<br />F#<br />Ruby<br />
  10. 10. Class<br />type Person(name,age) =<br />memberperson.Name = name<br />memberperson.Age = age<br />overrideperson.ToString() =<br />sprintf"%s %d" name age<br />classPerson<br />def initialize(name,age)<br />@name, @age = name, age<br />end<br />def name<br />@name<br />end<br />def age<br /> @age<br />end<br />defto_s<br />"#@name (#@age)"<br />end<br />end<br />F#<br />Ruby<br />
  11. 11. VS Integration <br />
  12. 12. What Next?<br />

×