Changeset 340 for trunk/EventBenchCore/src/de/ugoe/cs/eventbench
- Timestamp:
- 12/21/11 12:25:17 (13 years ago)
- Location:
- trunk/EventBenchCore/src/de/ugoe/cs/eventbench/assertions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/assertions/FileEqualsReplay.java
r327 r340 1 1 package de.ugoe.cs.eventbench.assertions; 2 3 import java.security.InvalidParameterException; 2 4 3 5 import de.ugoe.cs.eventbench.data.IReplayable; … … 19 21 * </p> 20 22 */ 21 String actualFile = null;23 protected final String actualFile; 22 24 23 25 /** … … 26 28 * </p> 27 29 */ 28 String expectedFile = null;30 protected final String expectedFile; 29 31 30 32 /** … … 44 46 * @param actualFile 45 47 * name and path of the actual file 48 * @throws InvalidParameterException 49 * thrown if expectedFile or actualFile are null 46 50 */ 47 51 public FileEqualsReplay(String expectedFile, String actualFile) { 52 if (expectedFile == null) { 53 throw new InvalidParameterException( 54 "expected file must not be null"); 55 } 56 if (actualFile == null) { 57 throw new InvalidParameterException("actual file must not be null"); 58 } 48 59 this.expectedFile = expectedFile; 49 60 this.actualFile = actualFile; … … 57 68 public String getReplay() { 58 69 59 actualFile= StringTools.xmlEntityReplacement(actualFile);60 expectedFile= StringTools.xmlEntityReplacement(expectedFile);70 String actualFileTmp = StringTools.xmlEntityReplacement(actualFile); 71 String expectedFileTmp = StringTools.xmlEntityReplacement(expectedFile); 61 72 62 73 StringBuilder currentMsgStr = new StringBuilder(800); 63 74 currentMsgStr.append(" <fileEquals "); 64 currentMsgStr.append("actualFile=\"" + actualFile + "\" ");65 currentMsgStr.append("expectedFile=\"" + expectedFile + "\"/>");75 currentMsgStr.append("actualFile=\"" + actualFileTmp + "\" "); 76 currentMsgStr.append("expectedFile=\"" + expectedFileTmp + "\"/>"); 66 77 currentMsgStr.append(StringTools.ENDLINE); 67 78 return currentMsgStr.toString(); -
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/assertions/TextEqualsReplay.java
r229 r340 1 1 package de.ugoe.cs.eventbench.assertions; 2 3 import java.security.InvalidParameterException; 2 4 3 5 import de.ugoe.cs.eventbench.data.IReplayable; … … 19 21 * </p> 20 22 */ 21 pr ivateString expectedValue;23 protected final String expectedValue; 22 24 23 25 /** … … 26 28 * </p> 27 29 */ 28 pr ivateString target;30 protected final String target; 29 31 30 32 /** … … 35 37 private static final long serialVersionUID = 1L; 36 38 39 /** 40 * <p> 41 * Constructor. Creates a new TextEqualsReplay. 42 * 43 * @param expectedValue 44 * expected string value 45 * @param target 46 * string description of the target whose string value is 47 * compared to the expected value 48 * @throws InvalidParameterException 49 * thrown if target is null 50 */ 37 51 public TextEqualsReplay(String expectedValue, String target) { 52 if (target == null) { 53 throw new InvalidParameterException("target must not be null"); 54 } 38 55 this.expectedValue = expectedValue; 39 56 this.target = target; … … 48 65 public String getReplay() { 49 66 50 expectedValue= StringTools.xmlEntityReplacement(expectedValue);67 String expectedValueTmp = StringTools.xmlEntityReplacement(expectedValue); 51 68 52 69 StringBuilder currentMsgStr = new StringBuilder(400); 53 currentMsgStr.append(" <textEquals expectedValue=\"" + expectedValue 70 currentMsgStr.append(" <textEquals expectedValue=\"" + expectedValueTmp 54 71 + "\">"); 55 72 currentMsgStr.append(StringTools.ENDLINE);
Note: See TracChangeset
for help on using the changeset viewer.