unit test

Hi
   is it possible to write unit testing for database independent
application.
if its possible then any one can help how to write unit test to check
whether the text field value is blank(keep in mind no database) or not.

i've used this method before:

http://www.bphogan.com/learn/pdf/tableless_contact_form.pdf