1 18 package org.apache.batik.test; 19 20 21 29 public class ParametrizedTest extends AbstractTest { 30 protected String A = "initial_A_value"; 31 protected String B = "initial_B_value"; 32 protected String expectedA = "unset"; 33 protected String expectedB = "unset"; 34 35 public void setA(String A) { 36 this.A = A; 37 } 38 39 public void setB(String B) { 40 this.B = B; 41 } 42 43 public void setExpectedA(String expectedA) { 44 this.expectedA = expectedA; 45 } 46 47 public void setExpectedB(String expectedB) { 48 this.expectedB = expectedB; 49 } 50 51 public String getA() { 52 return A; 53 } 54 55 public String getB() { 56 return B; 57 } 58 59 public String getExpectedA() { 60 return expectedA; 61 } 62 63 public String getExpectedB() { 64 return expectedB; 65 } 66 67 public TestReport runImpl() throws Exception { 68 if (!A.equals(expectedA) || !B.equals(expectedB)) { 69 TestReport r = reportError("Unexpected A or B value"); 70 r.addDescriptionEntry("expected.A", expectedA); 71 r.addDescriptionEntry("actual.A", A); 72 r.addDescriptionEntry("expected.B", expectedB); 73 r.addDescriptionEntry("actual.B", B); 74 return r; 75 } 76 77 return reportSuccess(); 78 } 79 } 80 | Popular Tags |