1 /*
2 * ==================================================================== The
3 * Apache Software License, Version 1.1
4 *
5 * Copyright (c) 2003 Digital Clash LLC. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met: 1.
9 * Redistributions of source code must retain the above copyright notice, this
10 * list of conditions and the following disclaimer. 2. Redistributions in
11 * binary form must reproduce the above copyright notice, this list of
12 * conditions and the following disclaimer in the documentation and/or other
13 * materials provided with the distribution. 3. The end-user documentation
14 * included with the redistribution, if any, must include the following
15 * acknowledgment: "This product includes software developed by the ChronicJ
16 * team (http://www.chronicj.org/)." Alternately, this acknowledgment may
17 * appear in the software itself, if and wherever such third-party
18 * acknowledgments normally appear. 4. The names "ChronicJ" and "Digital Clash"
19 * not be used to endorse or promote products derived from this software
20 * without prior written permission. For written permission, please contact
21 * info@digitalclash.com. 5. Products derived from this software may not be
22 * called "ChronicJ", "Digital Clash", nor may "ChronicJ" or "Digital Clash"
23 * appear in their name, without prior written permission of Digital Clash LLC.
24 *
25 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
26 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
27 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28 * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
32 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 * ==================================================================== This
36 * product includes software developed by the by the Apache Software Foundation
37 * (http://www.apache.org/).
38 * ====================================================================
39 */
40 package org.chronicj.impl;
41
42 import org.chronicj.DatePrecision;
43 import org.chronicj.TemporalExpression;
44 import org.chronicj.TemporalExpressionTest;
45 import org.chronicj.TimePoint;
46
47
48 /***
49 * JUnit Test for ArbitraryDateRangeTE <i>and</i> ArbitraryTimePointTE.
50 *
51 * @author <a href="mlipper@US-ABP.com">Matthew Lipper</a>
52 *
53 * @see <a href="http://junit.org">JUnit</a>
54 */
55 public class TECutAndPasteStub extends TemporalExpressionTest {
56 /*
57 * (non-Javadoc)
58 *
59 * @see org.chronicj.TemporalExpressionTest#initExpressionsAndResults(org.chronicj.DatePrecision)
60 */
61 protected void initExpressionsAndResults(DatePrecision precision)
62 throws Exception {
63 testExpression = new TemporalExpression[2];
64 expectedTimePoint = new TimePoint[2][2];
65 notExpectedTimePoint = new TimePoint[2][2];
66
67 if (DatePrecision.YEAR.equals(precision)) {
68 /* ### ### */
69 testExpression[0] = null;
70
71 //
72 expectedTimePoint[0][0] = null;
73
74 //
75 expectedTimePoint[0][1] = null;
76
77 //
78 notExpectedTimePoint[0][0] = null;
79
80 //
81 notExpectedTimePoint[0][1] = null;
82
83 /* ### ### */
84 testExpression[1] = null;
85
86 //
87 expectedTimePoint[1][0] = null;
88
89 //
90 expectedTimePoint[1][1] = null;
91
92 //
93 notExpectedTimePoint[1][0] = null;
94
95 //
96 notExpectedTimePoint[1][1] = null;
97 } else if (DatePrecision.MONTH.equals(precision)) {
98 /* ### ### */
99 testExpression[0] = null;
100
101 //
102 expectedTimePoint[0][0] = null;
103
104 //
105 expectedTimePoint[0][1] = null;
106
107 //
108 notExpectedTimePoint[0][0] = null;
109
110 //
111 notExpectedTimePoint[0][1] = null;
112
113 /* ### ### */
114 testExpression[1] = null;
115
116 //
117 expectedTimePoint[1][0] = null;
118
119 //
120 expectedTimePoint[1][1] = null;
121
122 //
123 notExpectedTimePoint[1][0] = null;
124
125 //
126 notExpectedTimePoint[1][1] = null;
127 } else if (DatePrecision.DATE.equals(precision)) {
128 /* ### ### */
129 testExpression[0] = null;
130
131 //
132 expectedTimePoint[0][0] = null;
133
134 //
135 expectedTimePoint[0][1] = null;
136
137 //
138 notExpectedTimePoint[0][0] = null;
139
140 //
141 notExpectedTimePoint[0][1] = null;
142
143 /* ### ### */
144 testExpression[1] = null;
145
146 //
147 expectedTimePoint[1][0] = null;
148
149 //
150 expectedTimePoint[1][1] = null;
151
152 //
153 notExpectedTimePoint[1][0] = null;
154
155 //
156 notExpectedTimePoint[1][1] = null;
157 } else if (DatePrecision.HOUR_OF_DAY.equals(precision)) {
158 /* ### ### */
159 testExpression[0] = null;
160
161 //
162 expectedTimePoint[0][0] = null;
163
164 //
165 expectedTimePoint[0][1] = null;
166
167 //
168 notExpectedTimePoint[0][0] = null;
169
170 //
171 notExpectedTimePoint[0][1] = null;
172
173 /* ### ### */
174 testExpression[1] = null;
175
176 //
177 expectedTimePoint[1][0] = null;
178
179 //
180 expectedTimePoint[1][1] = null;
181
182 //
183 notExpectedTimePoint[1][0] = null;
184
185 //
186 notExpectedTimePoint[1][1] = null;
187 } else if (DatePrecision.MINUTE.equals(precision)) {
188 /* ### ### */
189 testExpression[0] = null;
190
191 //
192 expectedTimePoint[0][0] = null;
193
194 //
195 expectedTimePoint[0][1] = null;
196
197 //
198 notExpectedTimePoint[0][0] = null;
199
200 //
201 notExpectedTimePoint[0][1] = null;
202
203 /* ### ### */
204 testExpression[1] = null;
205
206 //
207 expectedTimePoint[1][0] = null;
208
209 //
210 expectedTimePoint[1][1] = null;
211
212 //
213 notExpectedTimePoint[1][0] = null;
214
215 //
216 notExpectedTimePoint[1][1] = null;
217 } else if (DatePrecision.SECOND.equals(precision)) {
218 /* ### ### */
219 testExpression[0] = null;
220
221 //
222 expectedTimePoint[0][0] = null;
223
224 //
225 expectedTimePoint[0][1] = null;
226
227 //
228 notExpectedTimePoint[0][0] = null;
229
230 //
231 notExpectedTimePoint[0][1] = null;
232
233 /* ### ### */
234 testExpression[1] = null;
235
236 //
237 expectedTimePoint[1][0] = null;
238
239 //
240 expectedTimePoint[1][1] = null;
241
242 //
243 notExpectedTimePoint[1][0] = null;
244
245 //
246 notExpectedTimePoint[1][1] = null;
247 } else if (DatePrecision.MILLISECOND.equals(precision)) {
248 /* ### ### */
249 testExpression[0] = null;
250
251 //
252 expectedTimePoint[0][0] = null;
253
254 //
255 expectedTimePoint[0][1] = null;
256
257 //
258 notExpectedTimePoint[0][0] = null;
259
260 //
261 notExpectedTimePoint[0][1] = null;
262
263 /* ### ### */
264 testExpression[1] = null;
265
266 //
267 expectedTimePoint[1][0] = null;
268
269 //
270 expectedTimePoint[1][1] = null;
271
272 //
273 notExpectedTimePoint[1][0] = null;
274
275 //
276 notExpectedTimePoint[1][1] = null;
277 }
278 }
279
280 /*
281 * (non-Javadoc)
282 *
283 * @see org.chronicj.TemporalExpressionTest#supports(org.chronicj.DatePrecision)
284 */
285 protected boolean supports(DatePrecision precision)
286 throws Exception {
287 return true;
288 }
289 }
This page was automatically generated by Maven