THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Wiki Markup |
---|
A TestCase is a collection of [TestMethod|TestMethods] that share a common test environment. When using FlexUnit4, each \[TestCase\] can have a [\[Before\] | FlexUnit Metadata#Before ] and [\[After\] | FlexUnit Metadata#After] metadata tags that can be used to decorate methods you want to run before and/or after each test method. These metadatas simulate the <code>setUp{{ setUp()</code>}} and {{ <code>tearDowntearDown()</code>}} methods of [Fluint | http://fluint.googlecode.com/] and FlexUnit .9 | [http://code.google.com/p/as3flexunitlib/]. So, for example, if you wanted to write a series of [TestMethods| FlexUnit TestMethod] to test the Flex Timer class, they could all exist in a single TestCase. In the method decorated with [\[Before\] | FlexUnit Metadata#Before] you would create a Timer instance to test use in your tests. In the method decorated with [\[After\] | FlexUnit Metadata#After], you would stop that timer and remove references so it can be garbage collected. Additionally, you may decorate any number of static methods per class with the medatadata [\[BeforeClass\] | FlexUnit Metadata#BeforeClass ] and [\[AfterClass\] | FlexUnit Metadata#AfterClass]. These methods will be run once per test class. |
...