1 package org.andromda.translation.ocl.testsuite;
2
3 import java.net.URL;
4 import java.util.LinkedHashMap;
5 import java.util.Map;
6
7
8
9
10
11
12 public class TranslationTest
13 {
14 private String translation;
15 private Map<String, ExpressionTest> expressionConfigs = new LinkedHashMap<String, ExpressionTest>();
16 private URL uri;
17
18
19
20
21
22
23 public void setTranslation(String translation)
24 {
25 this.translation = translation;
26 }
27
28
29
30
31
32
33 public String getTranslation()
34 {
35 String methodName = "getTranslation";
36 if (this.translation == null)
37 {
38 throw new TranslationTestProcessorException(methodName + " - translation can not be null");
39 }
40 return this.translation;
41 }
42
43
44
45
46
47
48 public void addExpression(ExpressionTest config)
49 {
50 this.expressionConfigs.put(config.getFrom(), config);
51 }
52
53
54
55
56
57
58 public Map<String, ExpressionTest> getExpressionConfigs()
59 {
60 return this.expressionConfigs;
61 }
62
63
64
65
66
67
68 public URL getUri()
69 {
70 return uri;
71 }
72
73
74
75
76
77
78 protected void setUri(URL uri)
79 {
80 this.uri = uri;
81 }
82
83 }