Previous Post with C#
I recorded a new Google Hangout about using TDD (Test-Driven Development) workflow in Visual Studio 2010 and C#, writing my in-memory database project, SharpBase.
The video at:
This time I implemented a Column class. It was not need in previous tests. But now, I want to have the use case of having an autonumeric column, I added tests and functionality to cover that feature. I didn’t design all at advance. I designed the solution test by test, use case by use case. Maybe, in some point, I would apply a surgical refactor/redesign, but now, I have the test battery to support such change.
This is the last video about SharpBase. Since now, I will update directly the GitHub repo. You can check:
Maybe, I will record a new exercise, but in Spanish: an MVC application.
Angel “Java” Lopez
Next Post with C#
I’m coding SharpBase, documenting my TDD workflow using Google Hangouts. The new video at:
I implemented how to insert a row, given its values the method returns the new row. In this first test I only tested that the row was built. In the second tests I managed to implement the store of rows in a table. There is no interaction between rows and columns, yet. I could add tests for:
– Insert has less values than defined columns
– Insert has more values than defined columns
– Defined types in columns
– Autonumeric column
– Primary Key column
– Retrieve by primary key value
– Retrieve with given values (like MongoDB find), that is, query by example
– Query with operators
Those are things to write in the upcoming tests. I could record one or more videos, and then, I would switch to direct code in GitHub. The videos are for explaining the workflow, but after a few example I guess the process is clear. The idea is to implement using “baby steps”, and new tests/examples. TDD is like to play a videogame. Each new test/example is a challenge, and when we code to pass the test in green, we reach a new level in the game.
Angel “Java” Lopez