Test Cases

When unit testing, there seems to be two ways to go about writing a test suite:

Case 1 (One assertion per case):


TestString1Valid()
{
  assert string1.valid();
}


TestString2Valid()
{
  assert string2.valid();
}


TestStringsEqual()
{
  assert string1 == string 2;
}

Case 2 (Multiple assertions per case, grouped logically):


TestStrings()
{
  assert string1.valid();
  assert string2.valid();
  assert string1 == string2;
}

The second case feels more logical to me - group assertions together. But I've also heard of the concept of one assertion per test case.

What practice do you follow? Is there a prescribed way of doing it?

I usually do separate. In

I usually do separate. In most cases, because I depend on the setup() and teardown() methods to initialize variables, set them or something in preparation for my test. And I want them reset before each particular test. I guess I might group them together if I didn't need to setup/tear down after each check.