source: trunk/autoquest-plugin-guitar/src/main/java/de/ugoe/cs/autoquest/plugin/guitar/eventcore/GUITARReplayable.java @ 927

Last change on this file since 927 was 927, checked in by sherbold, 12 years ago
  • added copyright under the Apache License, Version 2.0
  • Property svn:mime-type set to text/plain
File size: 2.3 KB
Line 
1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.plugin.guitar.eventcore;
16
17import de.ugoe.cs.autoquest.IReplayDecorator;
18import de.ugoe.cs.autoquest.eventcore.IReplayable;
19import de.ugoe.cs.autoquest.plugin.guitar.EFGReplayDecorator;
20import de.ugoe.cs.util.StringTools;
21
22/**
23 * <p>
24 * {@link IReplayable} used to generate test cases for the GUITAR suite.
25 * </p>
26 *
27 * @author Steffen Herbold
28 * @version 1.0
29 */
30public class GUITARReplayable implements IReplayable {
31
32    /**
33     * <p>
34     * EventId in the EFG and GUI files.
35     * </p>
36     */
37    String eventId;
38
39    /**
40     * <p>
41     * Id for object serialization.
42     * </p>
43     */
44    private static final long serialVersionUID = 1L;
45
46    /**
47     * <p>
48     * Constructor. Creates a new {@link GUITARReplayable}.
49     * </p>
50     *
51     * @param eventId
52     */
53    public GUITARReplayable(String eventId) {
54        this.eventId = eventId;
55    }
56
57    /*
58     * (non-Javadoc)
59     *
60     * @see de.ugoe.cs.autoquest.eventcore.IReplayable#getReplay()
61     */
62    @Override
63    public String getReplay() {
64        StringBuilder replay = new StringBuilder();
65        replay.append("<Step>" + StringTools.ENDLINE);
66        replay.append("<EventId>" + eventId + "</EventId>" + StringTools.ENDLINE);
67        replay.append("<ReachingStep>false</ReachingStep>" + StringTools.ENDLINE);
68        replay.append("</Step>" + StringTools.ENDLINE);
69        return replay.toString();
70    }
71
72    /*
73     * (non-Javadoc)
74     *
75     * @see de.ugoe.cs.autoquest.eventcore.IReplayable#getDecorator()
76     */
77    @Override
78    public IReplayDecorator getDecorator() {
79        return EFGReplayDecorator.getInstance();
80    }
81
82}
Note: See TracBrowser for help on using the repository browser.