I think the easiest way would be using some assertions to test what you're going to implement, and then write the implementation to fit the testing code.
you need to write a separate application that will test the classes, this is known as the Test Harness.
So if your application has a class called "BankAccount" you would then write a test harness for it. The test harness would prepare data, call methods and examine results before declaring the test a pass or fail.
eg; to test a method that adds cash to your balance.
The idea is that you build up a collection of unit tests, and at any time in the future can compile and run them to make sure you haven't broken your application.