milindt / datastructures Goto Github PK
View Code? Open in Web Editor NEWWhile revisiting some of the data structures, I thought it would be interesting if our expectations from the data structures themselves are documented in terms of JUnit test cases. What if we go one step further and write those expectations first? Sure the tests would give errors at first, starting with some compilation errors as nothing is in place. But we would then focus on resolving those errors only. And as we go on, we will build our structure, one step at a time. We will be left with all of our requirements documented, which is also a working proof. Let's see if this Test driven approach works for us.