You write as many test methods as you need in a separate class (e.g. class StackTest to test the Stack class).
Typical test methods use the assertEquals method. If assertEquals fails, that test fails and JUnit immediately goes on to the next test.
You write as many test methods as you need in a separate class (e.g. class StackTest to test the Stack class).
Typical test methods use the assertEquals method. If assertEquals fails, that test fails and JUnit immediately goes on to the next test.