2006-06-15 11:01:51 UTC
I looked a bit at the Method class and found that you can actually do function-callbacks in Java also, which would make it possible to contain each test-step in a separate method. The downside is that the only way I've found to obtain a Method instance is by quering a method by its name, which is done during runtime. This means that the test-developer will not know if a test-case's steps are spelled right until the case is executed. A better solution would be able to feed the method instance as for classes with MyClass.class, but it have not found any way to do this... Have you?
Anyway, the proposed way to add a step using the design above would be:
addStep("MyMethod", "This is the step description");