I'm just starting out with unit testing in C#.
I have been reading about unit testing for a long time now, and I've already been playing around with NUnit, but this is the first time that I actually try to write real tests for real code.
But my problem is:
I'm having a hard time to come up with things that I can actually test.
The project I want to test is a conversion library (to convert lists of POCOs to ADO Recordsets).
So far, I've come up with only two things to test:
- if the recordset exists at all (not Null, not empty)
- if the content of each field is the same (--> if
RS!Foo == POCO.Foo
)
So, my questions are:
- What else can I test when my code just converts A to B?
- Or is this project too small / too simple / not a good example to write more than a few meaningful unit tests for?