source: trunk/EventBenchCore/src/de/ugoe/cs/eventbench/assertions/TextEqualsReplay.java @ 150

Last change on this file since 150 was 150, checked in by jhall, 13 years ago

Minor bugfixes

  • Property svn:mime-type set to text/plain
File size: 1.2 KB
Line 
1package de.ugoe.cs.eventbench.assertions;
2
3import de.ugoe.cs.eventbench.data.IReplayable;
4import de.ugoe.cs.util.StringTools;
5
6public class TextEqualsReplay implements IReplayable {
7
8        private String expectedValue = null;
9        private String target = null;
10        /**
11         * Id for object serialization.
12         */
13        private static final long serialVersionUID = 1L;
14
15        public void setExpectedValue(String s) {
16                expectedValue = s;
17        }
18
19        public void setTarget(String s) {
20                target = s;
21        }
22
23        public String getReplay() {
24
25                expectedValue = StringTools.xmlEntityReplacement(expectedValue);
26               
27                StringBuilder currentMsgStr = new StringBuilder(400);
28                currentMsgStr.append(" <textEquals expectedValue=\"" + expectedValue + "\">");
29                currentMsgStr.append(StringTools.ENDLINE);
30                currentMsgStr.append("<target>");
31                currentMsgStr.append(StringTools.ENDLINE);
32                currentMsgStr.append(target);
33                currentMsgStr.append(StringTools.ENDLINE);
34                currentMsgStr.append("</target>");
35                currentMsgStr.append(StringTools.ENDLINE);
36                currentMsgStr.append("</textEquals>");
37                currentMsgStr.append(StringTools.ENDLINE);
38                return currentMsgStr.toString();
39        }
40
41
42        public String getTarget() {
43                return target;
44        }
45
46}
Note: See TracBrowser for help on using the repository browser.