View Javadoc

1   /*
2    * $Id: ParameterizedConfiguration.java 22039 2011-05-30 19:12:17Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.tck;
12  
13  import org.mule.api.NamedObject;
14  
15  import java.util.Map;
16  
17  import org.junit.runners.Parameterized;
18  import org.junit.runners.Parameterized.Parameters;
19  
20  
21  /**
22   * Parameterized Mule test classes (JUnit 4) should return a collection of objects 
23   * which implement this interface in the method annotated by @Parameters
24   * 
25   * @see MuleParameterized
26   * @see Parameterized
27   * @see Parameters
28   */
29  public interface ParameterizedConfiguration extends NamedObject
30  {
31      /**
32       * Perform any needed initialization in this method, such as loading properties from a properties file.
33       * 
34       * @param callingClass is sometimes needed for correct classpath ordering
35       * @throws Exception
36       */
37      public void initialise(Class callingClass) throws Exception;
38  
39      /**
40       * A configuration which is not enabled will be skipped over when running tests.
41       */
42      public boolean isEnabled();
43  
44      /**
45       * Any properties returned by this method will be made available for substitution in the XML 
46       * configuration file(s) for this test case.
47       */
48      public Map getProperties();
49  }