Last change
on this file since 560 was
560,
checked in by sherbold, 12 years ago
|
- rewrote replay decorator handling
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.7 KB
|
Rev | Line | |
---|
[560] | 1 |
|
---|
[434] | 2 | package de.ugoe.cs.quest.plugin.guitar.eventcore;
|
---|
[197] | 3 |
|
---|
[560] | 4 | import de.ugoe.cs.quest.IReplayDecorator;
|
---|
[433] | 5 | import de.ugoe.cs.quest.eventcore.IReplayable;
|
---|
[560] | 6 | import de.ugoe.cs.quest.plugin.guitar.EFGReplayDecorator;
|
---|
[204] | 7 | import de.ugoe.cs.util.StringTools;
|
---|
[197] | 8 |
|
---|
[204] | 9 | /**
|
---|
| 10 | * <p>
|
---|
| 11 | * {@link IReplayable} used to generate test cases for the GUITAR suite.
|
---|
| 12 | * </p>
|
---|
| 13 | *
|
---|
| 14 | * @author Steffen Herbold
|
---|
| 15 | * @version 1.0
|
---|
| 16 | */
|
---|
[556] | 17 | public class GUITARReplayable implements IReplayable {
|
---|
[197] | 18 |
|
---|
[560] | 19 | /**
|
---|
| 20 | * <p>
|
---|
| 21 | * EventId in the EFG and GUI files.
|
---|
| 22 | * </p>
|
---|
| 23 | */
|
---|
| 24 | String eventId;
|
---|
[204] | 25 |
|
---|
[560] | 26 | /**
|
---|
| 27 | * <p>
|
---|
| 28 | * Id for object serialization.
|
---|
| 29 | * </p>
|
---|
| 30 | */
|
---|
| 31 | private static final long serialVersionUID = 1L;
|
---|
[197] | 32 |
|
---|
[560] | 33 | /**
|
---|
| 34 | * <p>
|
---|
| 35 | * Constructor. Creates a new {@link GUITARReplayable}.
|
---|
| 36 | * </p>
|
---|
| 37 | *
|
---|
| 38 | * @param eventId
|
---|
| 39 | */
|
---|
| 40 | public GUITARReplayable(String eventId) {
|
---|
| 41 | this.eventId = eventId;
|
---|
| 42 | }
|
---|
[204] | 43 |
|
---|
[560] | 44 | /*
|
---|
| 45 | * (non-Javadoc)
|
---|
| 46 | *
|
---|
| 47 | * @see de.ugoe.cs.quest.eventcore.IReplayable#getReplay()
|
---|
| 48 | */
|
---|
| 49 | @Override
|
---|
| 50 | public String getReplay() {
|
---|
| 51 | StringBuilder replay = new StringBuilder();
|
---|
| 52 | replay.append("<Step>" + StringTools.ENDLINE);
|
---|
| 53 | replay.append("<EventId>" + eventId + "</EventId>" + StringTools.ENDLINE);
|
---|
| 54 | replay.append("<ReachingStep>false</ReachingStep>" + StringTools.ENDLINE);
|
---|
| 55 | replay.append("</Step>" + StringTools.ENDLINE);
|
---|
| 56 | return replay.toString();
|
---|
| 57 | }
|
---|
[197] | 58 |
|
---|
[560] | 59 | /*
|
---|
| 60 | * (non-Javadoc)
|
---|
| 61 | *
|
---|
| 62 | * @see de.ugoe.cs.quest.eventcore.IReplayable#getDecorator()
|
---|
| 63 | */
|
---|
| 64 | @Override
|
---|
| 65 | public IReplayDecorator getDecorator() {
|
---|
| 66 | return EFGReplayDecorator.getInstance();
|
---|
| 67 | }
|
---|
| 68 |
|
---|
[197] | 69 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.