View Javadoc
1   package net.avcompris.base.testutil.processes;
2   
3   import static com.google.common.base.Preconditions.checkNotNull;
4   
5   import java.util.ArrayList;
6   import java.util.HashMap;
7   import java.util.List;
8   import java.util.Map;
9   
10  class ProcessInstance {
11  
12  	public ProcessInstance(final AbstractProcess<?, ?> process) {
13  
14  		this.process = checkNotNull(process, "process");
15  	}
16  
17  	public final AbstractProcess<?, ?> process;
18  
19  	/**
20  	 * Errors encountered on the main process.
21  	 */
22  	public final List<Throwable> errors = new ArrayList<Throwable>();
23  
24  	/**
25  	 * Errors encountered on test methods.
26  	 * <ul>
27  	 * <li> keys: names of test methods.
28  	 * <li> values: errors.
29  	 * </ul>
30  	 */
31  	public final Map<String, List<Throwable>> methodErrors = new HashMap<String, List<Throwable>>();
32  
33  	/**
34  	 * Assertion errors encountered on test methods.
35  	 * <ul>
36  	 * <li> keys: names of test methods.
37  	 * <li> values: failures.
38  	 * </ul>
39  	 */
40  	public final Map<String, List<AssertionError>> methodFailures = new HashMap<String, List<AssertionError>>();
41  
42  	/**
43  	 * ProcessEntry results encountered on test methods.
44  	 * <ul>
45  	 * <li> keys: names of test methods.
46  	 * <li> values: results with ProcessEntry IDs.
47  	 * </ul>
48  	 */
49  	public final Map<String, List<ProcessEntryResult>> processEntryResults = new HashMap<String, List<ProcessEntryResult>>();
50  }