سؤال

I'm using JUnit and FEST for Swing integration testing of our app that I start and stop, multiple times in the test case. Should @after include a call to robot.cleanUp()?

هل كانت مفيدة؟

المحلول

The general rule is as follows: each initialization site of a FrameFixture should have a corresponding cleanup site.

Sepcifically, if your @Before method initializes a FrameFixture (as in: w = new FrameFixture<MyWindow>() where w is a field of the test class) then you should define a @After method that will release the resources via w.cleanUp().

See the sample in: http://docs.codehaus.org/display/FEST/Getting+Started.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top