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