View Javadoc

1   /*
2    * $Id: ParameterizedConfiguration.java 19191 2010-08-25 21:05:23Z tcarlson $
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 java.util.Map;
14  
15  import org.junit.runners.Parameterized;
16  import org.junit.runners.Parameterized.Parameters;
17  
18  
19  /**
20   * Parameterized Mule test classes (JUnit 4) should return a collection of objects 
21   * which implement this interface in the method annotated by @Parameters
22   * 
23   * @see MuleParameterized
24   * @see Parameterized
25   * @see Parameters
26   */
27  public interface ParameterizedConfiguration
28  {
29      /**
30       * A string that uniquely identifies the configuration.
31       */
32      public String getName();
33  
34      /**
35       * Perform any needed initialization in this method, such as loading properties from a properties file.
36       * 
37       * @param callingClass is sometimes needed for correct classpath ordering
38       * @throws Exception
39       */
40      public void initialise(Class callingClass) throws Exception;
41  
42      /**
43       * A configuration which is not enabled will be skipped over when running tests.
44       */
45      public boolean isEnabled();
46  
47      /**
48       * Any properties returned by this method will be made available for substitution in the XML 
49       * configuration file(s) for this test case.
50       */
51      public Map getProperties();
52  }