01: package org.andromda.translation.ocl.testsuite;
02:
03: /**
04: * Represents a ExpressionText object loaded into an TranslatorTestConfig object.
05: *
06: * @author Chad Brandon
07: */
08: public class ExpressionTest {
09:
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: final String methodName = "ExpressionTest.getFrom";
20: if (this .to == null) {
21: throw new TranslationTestProcessorException(methodName
22: + " - from can not be null");
23: }
24: return from;
25: }
26:
27: /**
28: * Set the from translation.
29: *
30: * @param from the expression from which translation occurs.
31: */
32: public void setFrom(String from) {
33: this .from = from;
34: }
35:
36: /**
37: * Gets the translation to which the translation should match.
38: *
39: * @return String
40: */
41: public String getTo() {
42: final String methodName = "ExpressionTest.getTo";
43: if (this .to == null) {
44: throw new TranslationTestProcessorException(methodName
45: + " - to can not be null");
46: }
47: return to;
48: }
49:
50: /**
51: * Sets the translation to which the translation should match after the translation of the 'from' property occurs.
52: *
53: * @param to
54: */
55: public void setTo(String to) {
56: this.to = to;
57: }
58:
59: }
|