KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > junit > SharedFactory


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.junit;
8
9
10 /**
11  * This interface is the factory that is shared between the
12  * client and location sides.
13  */

14 public interface SharedFactory
15 {
16     /**
17      * <p>
18      * Constructs and returns an instance of the Result interface. This is the only
19      * cross boundary interface because the Location side must know how to create
20      * and return results and the Client side must be able to receive and interpret
21      * results.
22      * </p>
23      * <p>
24      * This version of the method does not take any parameters and therefore should
25      * be used for a success Result.
26      * </p>
27      *
28      * @return A new Result instance
29      */

30     Result createResult();
31
32     /**
33      * <p>
34      * Constructs and returns an instance of the Result interface. This is the only
35      * cross boundary interface because the Location side must know how to create
36      * and return results and the Client side must be able to receive and interpret
37      * results.
38      * </p>
39      * <p>
40      * This version of the method takes a single Throwable, which is normally an
41      * Exception that was thrown from a test. This version of the createResult
42      * method should be used to construct failure Results.
43      * </p>
44      *
45      * @param t The Throwable that was generate during the failure
46      * @return A new Result instance
47      */

48     Result createResult(Throwable JavaDoc t);
49 }
50
51
Popular Tags