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