1 package org.andromda.translation.ocl.testsuite;
2
3 /**
4 * Represents a ExpressionText object loaded into an TranslatorTestConfig object.
5 *
6 * @author Chad Brandon
7 */
8 public class ExpressionTest
9 {
10 private String to;
11 private String from;
12
13 /**
14 * Gets the from translation.
15 *
16 * @return String
17 */
18 public String getFrom()
19 {
20 final String methodName = "ExpressionTest.getFrom";
21 if (this.to == null)
22 {
23 throw new TranslationTestProcessorException(methodName + " - from can not be null");
24 }
25 return from;
26 }
27
28 /**
29 * Set the from translation.
30 *
31 * @param from the expression from which translation occurs.
32 */
33 public void setFrom(String from)
34 {
35 this.from = from;
36 }
37
38 /**
39 * Gets the translation to which the translation should match.
40 *
41 * @return String
42 */
43 public String getTo()
44 {
45 final String methodName = "ExpressionTest.getTo";
46 if (this.to == null)
47 {
48 throw new TranslationTestProcessorException(methodName + " - to can not be null");
49 }
50 return to;
51 }
52
53 /**
54 * Sets the translation to which the translation should match after the translation of the 'from' property occurs.
55 *
56 * @param to
57 */
58 public void setTo(String to)
59 {
60 this.to = to;
61 }
62 }