]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/tree/PartSubList.java
71843e41c8c5883b42e4f7c33686cdd656637704
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / core / test / tree / PartSubList.java
1 package org.argeo.slc.core.test.tree;
2
3 import java.util.List;
4 import java.util.Vector;
5
6 import org.argeo.slc.core.test.TestResultPart;
7 import org.argeo.slc.core.test.TestStatus;
8
9 /**
10 * List of <code>TestResultPart</code>. It can be used to build complex
11 * <code>TestResult</code> affording the possibility to a
12 * <code>TestDefinition</code> to add a list of result part under the same
13 * <code>StructurePath</code>.
14 *
15 * @see TreeTestResult
16 */
17 public class PartSubList {
18
19 /** For ORM */
20 private Long tid;
21
22 private List<TestResultPart> parts = new Vector<TestResultPart>();
23
24 /** Gets the result parts. */
25 public List<TestResultPart> getParts() {
26 return parts;
27 }
28
29 /** Sets the result parts. */
30 public void setParts(List<TestResultPart> parts) {
31 this.parts = parts;
32 }
33
34 Long getTid() {
35 return tid;
36 }
37
38 void setTid(Long tid) {
39 this.tid = tid;
40 }
41
42 public Boolean getIsPassed(){
43 for(TestResultPart part: parts){
44 if(part.getStatus()!=TestStatus.PASSED){
45 return false;
46 }
47 }
48 return true;
49 }
50 }