File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
src/test/java/org/scijava/module Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 3434import static org .junit .Assert .assertNull ;
3535import static org .junit .Assert .assertSame ;
3636
37+ import org .junit .After ;
38+ import org .junit .Before ;
3739import org .junit .Test ;
3840import org .scijava .Context ;
3941
4446 */
4547public class ModuleServiceTest {
4648
47- @ Test
48- public void testGetSingleInput () throws ModuleException {
49+ private ModuleService moduleService ;
50+
51+ @ Before
52+ public void setUp () {
4953 final Context context = new Context (ModuleService .class );
50- final ModuleService moduleService = context .getService (ModuleService .class );
54+ moduleService = context .service (ModuleService .class );
55+ }
5156
57+ @ After
58+ public void tearDown () {
59+ moduleService .context ().dispose ();
60+ }
61+
62+ @ Test
63+ public void testGetSingleInput () throws ModuleException {
5264 final ModuleInfo info = new FooModuleInfo ();
5365 final Module module = info .createModule ();
5466
You can’t perform that action at this time.
0 commit comments