1 13 14 package org.eclipse.jdt.internal.junit.runner; 15 16 17 18 19 public class TestReferenceFailure { 20 21 private final ITestIdentifier fTest; 22 23 private final String fTrace; 24 25 private final String fStatus; 26 27 private FailedComparison fComparison; 28 29 public TestReferenceFailure(ITestIdentifier ref, String status, String trace) { 30 this(ref, status, trace, null); 31 } 32 33 public TestReferenceFailure(ITestIdentifier reference, String status, 34 String trace, FailedComparison comparison) { 35 fTest = reference; 36 fStatus = status; 37 fTrace = trace; 38 fComparison = comparison; 39 } 40 41 public TestReferenceFailure(ITestReference reference, String status, String trace) { 42 this(reference.getIdentifier(), status, trace); 43 } 44 45 public String getStatus() { 46 return fStatus; 47 } 48 49 public String getTrace() { 50 return fTrace; 51 } 52 53 public ITestIdentifier getTest() { 54 return fTest; 55 } 56 57 public String toString() { 58 return fStatus + " " + fTest.getName(); } 60 61 public boolean equals(Object obj) { 62 TestReferenceFailure f = (TestReferenceFailure) obj; 63 return f.fTest.equals(fTest) && f.fStatus.equals(fStatus) 64 && f.fTrace.equals(fTrace); 65 } 66 67 public void setComparison(FailedComparison comparison) { 68 fComparison = comparison; 69 } 70 71 public FailedComparison getComparison() { 72 return fComparison; 73 } 74 } 75 | Popular Tags |