01: package org.springunit.examples.tutorial;
02:
03: import java.util.Calendar;
04:
05: import org.springunit.examples.Range;
06: import org.springunit.framework.SpringUnitContext;
07: import org.springunit.framework.SpringUnitTest;
08:
09: public class RangeTutorialExample5Test extends SpringUnitTest {
10:
11: public SpringUnitContext getRangeTutorialExample5Test() {
12: return this .rangeTutorialExample5Test;
13: }
14:
15: public void setRangeTutorialExample5Test(
16: SpringUnitContext rangeTutorialExample5Test) {
17: this .rangeTutorialExample5Test = rangeTutorialExample5Test;
18: }
19:
20: public void testIsWithinBelowLower() throws Exception {
21: runIsWithin();
22: }
23:
24: public void testIsWithinAtLower() throws Exception {
25: runIsWithin();
26: }
27:
28: public void testIsWithinBetween() throws Exception {
29: runIsWithin();
30: }
31:
32: public void testIsWithinAtUpper() throws Exception {
33: runIsWithin();
34: }
35:
36: public void testIsWithinAboveUpper() throws Exception {
37: runIsWithin();
38: }
39:
40: protected void runIsWithin() throws Exception {
41: Range<Calendar> subject = getObject("subject");
42: Calendar item = getObject("item");
43: boolean expected = getObject("expected");
44: boolean actual = subject.isWithin(item);
45: assertEquals(expected, actual);
46: }
47:
48: private SpringUnitContext rangeTutorialExample5Test;
49:
50: }
|