Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Functional BDD at Cuke Up

918 views

Published on

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

Published in: Technology
  • Be the first to comment

  • Be the first to like this

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 />

×