source: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/efg/data/EFGReplayable.java

Last change on this file was 204, checked in by sherbold, 13 years ago

+ added functionality to generate replays for GUITAR from models generated for EFGs.

  • Property svn:mime-type set to text/plain
File size: 1.4 KB
RevLine 
[197]1package de.ugoe.cs.eventbench.efg.data;
2
3import de.ugoe.cs.eventbench.data.IReplayable;
[204]4import de.ugoe.cs.util.StringTools;
[197]5
[204]6/**
7 * <p>
8 * {@link IReplayable} used to generate test cases for the GUITAR suite.
9 * </p>
10 *
11 * @author Steffen Herbold
12 * @version 1.0
13 */
[197]14public class EFGReplayable implements IReplayable {
15
16        /**
17         * <p>
[204]18         * EventId in the EFG and GUI files.
19         * </p>
20         */
21        String eventId;
22
23        /**
24         * <p>
[197]25         * Id for object serialization.
26         * </p>
27         */
28        private static final long serialVersionUID = 1L;
29
[204]30        /**
31         * <p>
32         * Constructor. Creates a new {@link EFGReplayable}.
33         * </p>
34         *
35         * @param eventId
36         */
37        public EFGReplayable(String eventId) {
38                this.eventId = eventId;
39        }
40
41        /*
42         * (non-Javadoc)
43         *
44         * @see de.ugoe.cs.eventbench.data.IReplayable#getReplay()
45         */
[197]46        @Override
47        public String getReplay() {
[204]48                StringBuilder replay = new StringBuilder();
49                replay.append("<Step>" + StringTools.ENDLINE);
50                replay.append("<EventId>" + eventId + "</EventId>" + StringTools.ENDLINE);
51                replay.append("<ReachingStep>false</ReachingStep>" + StringTools.ENDLINE);
52                replay.append("</Step>" + StringTools.ENDLINE);
53                return replay.toString();
[197]54        }
55
[204]56        /*
57         * (non-Javadoc)
58         *
59         * @see de.ugoe.cs.eventbench.data.IReplayable#getTarget()
60         */
[197]61        @Override
62        public String getTarget() {
[204]63                return null; // target indirectly included in replay through the eventId
[197]64        }
65
66}
Note: See TracBrowser for help on using the repository browser.