I want to test username & password from DAO class(validate method)
I am having those values in login table database.
should I check those values in Test class by taking expected data as "hard coded" values? OR how?
Again--it depends on what you're trying to test. If you're trying to test the DAO's interaction with the database, that's a completely different issue (and not really a unit test, at least by my definition--that'd be an integration test). If you want to test your action, you don't *need* to go to the database--and for a unit test, I try to avoid database access because of the additional time overhead it would add.
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards