Ignore:
Timestamp:
12/21/11 12:25:17 (12 years ago)
Author:
sherbold
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/assertions/FileEqualsReplay.java

    r327 r340  
    11package de.ugoe.cs.eventbench.assertions; 
     2 
     3import java.security.InvalidParameterException; 
    24 
    35import de.ugoe.cs.eventbench.data.IReplayable; 
     
    1921         * </p> 
    2022         */ 
    21         String actualFile = null; 
     23        protected final String actualFile; 
    2224 
    2325        /** 
     
    2628         * </p> 
    2729         */ 
    28         String expectedFile = null; 
     30        protected final String expectedFile; 
    2931 
    3032        /** 
     
    4446         * @param actualFile 
    4547         *            name and path of the actual file 
     48         * @throws InvalidParameterException 
     49         *             thrown if expectedFile or actualFile are null 
    4650         */ 
    4751        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                } 
    4859                this.expectedFile = expectedFile; 
    4960                this.actualFile = actualFile; 
     
    5768        public String getReplay() { 
    5869 
    59                 actualFile = StringTools.xmlEntityReplacement(actualFile); 
    60                 expectedFile = StringTools.xmlEntityReplacement(expectedFile); 
     70                String actualFileTmp = StringTools.xmlEntityReplacement(actualFile); 
     71                String expectedFileTmp = StringTools.xmlEntityReplacement(expectedFile); 
    6172 
    6273                StringBuilder currentMsgStr = new StringBuilder(800); 
    6374                currentMsgStr.append("  <fileEquals "); 
    64                 currentMsgStr.append("actualFile=\"" + actualFile + "\" "); 
    65                 currentMsgStr.append("expectedFile=\"" + expectedFile + "\"/>"); 
     75                currentMsgStr.append("actualFile=\"" + actualFileTmp + "\" "); 
     76                currentMsgStr.append("expectedFile=\"" + expectedFileTmp + "\"/>"); 
    6677                currentMsgStr.append(StringTools.ENDLINE); 
    6778                return currentMsgStr.toString(); 
Note: See TracChangeset for help on using the changeset viewer.