Unit testing void methods?

What is the best way to unit test a method that doesn’t return anything? Specifically in c#.

What I am really trying to test is a method that takes a log file and parses it for specific strings. The strings are then inserted into a database. Nothing that hasn’t been done before but being VERY new to TDD I am wondering if it is possible to test this or is it something that doesn’t really get tested.

11 Answers
11

Leave a Comment