01: /*
02: * $Id: TimeOfDayTest.java 459989 2006-03-25 16:28:23Z dashorst $
03: * $Revision: 459989 $
04: * $Date: 2006-03-25 17:28:23 +0100 (Sat, 25 Mar 2006) $
05: *
06: * ====================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License");
08: * you may not use this file except in compliance with the License.
09: * You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19: package wicket.util.time;
20:
21: import junit.framework.Assert;
22: import junit.framework.TestCase;
23:
24: /**
25: * Test cases for this object
26: * @author Jonathan Locke
27: */
28: public final class TimeOfDayTest extends TestCase {
29: /**
30: *
31: */
32: public void test() {
33: Assert.assertEquals(0, TimeOfDay.MIDNIGHT.hour());
34: Assert.assertEquals(TimeOfDay.MIDNIGHT, TimeOfDay
35: .valueOf(TimeOfDay.MIDNIGHT.next()));
36:
37: final TimeOfDay three = TimeOfDay.time(3, 0, TimeOfDay.PM);
38: final TimeOfDay five = TimeOfDay.time(5, 0, TimeOfDay.PM);
39:
40: Assert.assertTrue(five.after(three));
41: }
42: }
|