Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Here is an overview of the steps you should follow

  1. Build out the wiki with the acceptance criteria tests

  2. Create the fixture

    1. if the fixture links to the wiki you are good to go

  3. Perform a draft design of the components required

  4. For each component develop its code following a TDD life cycle, you would use a unit testing framework here

  5. Integrate your components so that the tests on the wiki incrementally pass

Here is an wiki script for the Find Highest Number problem

!contents -R2 -g -p -f -h
 
!define TEST_SYSTEM {slim}
 
!path C:\work\find-highest-number\target\find-highest-number-1.0-SNAPSHOT.jar
 
|import                         |
|com.celestial.findhighestnumber|
 
|Find Highest Number Fixture|
|Numbers   |Expected Value? |
|4,5,90,7  |90              |

|Find Highest Number Fixture |
|Numbers List|Expected Value?|
|[4,5,90,7]  |90             |



Further challenge

Rather than just returning the highest number also sort the the array of integers

Here is the wiki script

!contents -R2 -g -p -f -h
 
!define TEST_SYSTEM {slim}
 
!path C:\work\software\netbeans\tdd-find-highest-number\target\tdd-find-highest-number-1.0.jar
 
|import                         |
|com.celestial.tdd.fitnesse.demo|
 
|Find Highest Number Fixture|
|Numbers   |Expected Value? |
|4,5,90,7  |90              |

|Find Highest Number Fixture |
|Numbers List|Expected Value?|
|4,5,90,7    |90             |

|Find Highest Number And Sort Array Fixture|
|Numbers List         |Sorted List?        |
|4,5,90,7             |4,5,7,90            |


Alternative more advanced wiki script

!contents -R2 -g -p -f -h
 
!define TEST_SYSTEM {slim}
 
!path C:\work\software\netbeans\tdd-find-highest-number\target\tdd-find-highest-number-1.0.jar
 
|import                            |
|com.celestial.tdd.fitnesse.demo   |
|com.celestial.tdd.fitnesse.demo.v2|


 
|Find Highest Number Fixture|
|Numbers   |Expected Value? |
|4,5,90,7  |90              |

|Find Highest Number Fixture |
|Numbers List|Expected Value?|
|4,5,90,7    |90             |

|Find Highest Number Or Sort Array Fixture|
|Numbers List        |Sorted List?        |
|4,5,90,7            |4,5,7,90            |

|Find Highest Number And Sort Array Fixture|
|Numbers List |Expected Value?|Sorted List?|
|4,5,90,7     |90             |4,5,7,90    |


Fully worked example


  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.