- You can create and *setup* objects writing the setup code in the test case, before each section. For example, you can create a state machine and bring it to a particular state you want to test.
- You can create and *setup* objects writing the setup code at the beginning of the test case. For example, you can create a state machine and bring it to a particular state you want to test.
- When a section starts executing, it will find the object exactly in the same state as you set it up. Changes to the object in previous sections are not reflected in other sections, because the object is effectively destroyed and recreated for each section.
-*Teardown* code can be written at the end of the test case. You can clear resources here, for example deleting a dinamically allocated object, in order not to leak memory each time a section is executed.