S
Simon Woods
Hi
I'm still trying to get my head around how to do TDD.
I have a situation where I have a set of classes which build a tree
which contains nested (subselect) SQL statements. The tree is completely
internal to my project and there is no need to make it public in any
way. The logic is pretty complex (for me anyway) and so I want to be
able to test it with a variety of test cases. The tree generates SQL
which is then used to create a dataset and this is the public object.
However, I understand that TDD only tests the public interfaces ... but
that's not good enough as the dataset will be other things are well
(e.g. formatting values etc)
So my question is, what is the TDD way for testing my SQL generation. At
the moment I have included a public Test Class which instantiates and
builds my SQL tree thus allow me to see how it is behaving, but I'm not
sure that this is the right/best way.
Could someone explain alternative strategies which are perhaps "more TDD".
Thanks
Simon
I'm still trying to get my head around how to do TDD.
I have a situation where I have a set of classes which build a tree
which contains nested (subselect) SQL statements. The tree is completely
internal to my project and there is no need to make it public in any
way. The logic is pretty complex (for me anyway) and so I want to be
able to test it with a variety of test cases. The tree generates SQL
which is then used to create a dataset and this is the public object.
However, I understand that TDD only tests the public interfaces ... but
that's not good enough as the dataset will be other things are well
(e.g. formatting values etc)
So my question is, what is the TDD way for testing my SQL generation. At
the moment I have included a public Test Class which instantiates and
builds my SQL tree thus allow me to see how it is behaving, but I'm not
sure that this is the right/best way.
Could someone explain alternative strategies which are perhaps "more TDD".
Thanks
Simon