01: package org.springunit.examples.tutorial;
02:
03: import org.springunit.examples.CompositeDate;
04: import org.springunit.framework.SpringUnitContext;
05: import org.springunit.framework.SpringUnitTest;
06:
07: public class CompositeDateTutorialExample1Test extends SpringUnitTest {
08:
09: public void testJan01() throws Exception {
10: runSetDay();
11: }
12:
13: public void testDec31() throws Exception {
14: runSetDay();
15: }
16:
17: protected void runSetDay() throws Exception {
18: CompositeDate subject = getObject("subject");
19: int day = getObject("day");
20: int expectedDay = getObject("expectedDay");
21: subject.setDay(day);
22: assertEquals(expectedDay, subject.getDay());
23: }
24:
25: public SpringUnitContext getCompositeDateTutorialExample1Test() {
26: return this .compositeDateTutorialExample1Test;
27: }
28:
29: public void setCompositeDateTutorialExample1Test(
30: SpringUnitContext compositeDateTutorialExample1Test) {
31: this .compositeDateTutorialExample1Test = compositeDateTutorialExample1Test;
32: }
33:
34: private SpringUnitContext compositeDateTutorialExample1Test;
35:
36: }
|