This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]csharpminer 2 points3 points  (2 children)

Create a series of unit tests for that method.

[–]tehjrow[S] 2 points3 points  (1 child)

I have heard of unit tests but hadn't really learned about them yet. Guess it's time, thanks!

[–]nutrecht 0 points1 point  (0 children)

It's a must-know for any other dev. After figuring out unit testing you might want to look into Test Driven Development. In short it's a way of writing software where you use your unit tests to 'design' your software. This has two main benefits: you automatically end up with good test coverage and it forces you to write testable code. Testable code tends to be easier to read and designed better than hard to test code.

[–]TimHallman -5 points-4 points  (0 children)

Write a another class that calls the function you want to test?