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