01: /*
02: * Copyright 2006-2007, Unitils.org
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.unitils.core;
17:
18: import java.util.Properties;
19:
20: /**
21: * A type for modules that offer services to tests.
22: * Before a module is used, {@link #init} will be called so that it can initialize itself. After initialization,
23: * {@link #createTestListener()} will be called, so that the module can create a callback that can plug into
24: * the test exucution sequence. See {@link TestListener} javadoc for more info.
25: *
26: * @author Tim Ducheyne
27: * @author Filip Neven
28: */
29: public interface Module {
30:
31: /**
32: * Initializes the module with the given configuration settings.
33: *
34: * @param configuration The config, not null
35: */
36: public void init(Properties configuration);
37:
38: /**
39: * Creates the test listener for this module.
40: *
41: * @return The test listener, not null
42: */
43: public TestListener createTestListener();
44:
45: }
|