[Seasar-user:6979] Re: S2JUnit4でExcelファイルの期待値を使用

[E-MAIL ADDRESS DELETED] [E-MAIL ADDRESS DELETED]
2007年 3月 30日 (金) 14:40:28 JST


$B>>86$G$9!#(B

$B!!$465<(M-Fq$&$4$6$$$^$9!#(B
assertBeanEquals$B$[E-MAIL ADDRESS DELETED]>o$K8!>Z$G$-$^$7$?!*!*(B
$B$A$J$_$K$3$A$i$G3NG'$r<h$C$F$$$?$3$H$O!"(B

>>   Page$B%/%i%9(B.$B%G!<%?<hF@%a%=%C%I(B();
>>   $B!!(B(Page$B%/%i%9$G(BS2Dao$B$+$i%G!<%?<hF@(B $B!&!&!&(B $B-!(B)
>> $B!!!!(B($B$=$NCM$r(BList$BJQ?t$[E-MAIL ADDRESS DELETED](B $B!&!&!&(B $B-"(B)
$B$3$N-!$NCJ3,$G(B
>$B!!(BList<UserInfo> result = this.userInfoDao.selectAll();
$B$N$h$&$K(BEntity$B$X%G!<%?$r<hF@$7!"(B
$B-"$NCJ3,$G$=$NCM$+$iI,MW>pJs$r(BPage$B%/%i%9$N(BDataTable$BMQ%j%9%H(B
$BJQ?t$K0\$7$F$$$?$N$G$9$,!"$3$A$i$N$A$g$C$H$7$?%_%9$b$"$j!"(B
$B$&$^$/H=Dj$G$-$J$+$C$?$N$G$9$,!"2CF#$5$s$N>pJsDL$j!"@5>o$K(B
assert$BH=Dj$9$k$3$H$,$G$-$^$7$?!#(B


$B0J>e$G$9!#M-Fq$&$4$6$$$^$7$?!#(B


>$B2CF#$G$9!%(B
>
>$B;d$b(BS2JUnit4$B$G(BS2Dao$B$N(BDao$B$N%F%9%H%3!<%I=q$$$F$$$^$9!%(B
>
>$B%(%s%F%#%F%#$N%j%9%H$r8!>Z$7$?$$$s$G$9$h$M!)(B
>$B;d$O!$(BassertEquals$B$G$O$J$/!$(BassertBeanEquals$B$r;H$C$F$$$^$9$,!$E*$r30$l$@$C$?$i$9$_$^$;$s!%(B
>
>import static org.seasar.framework.unit.S2Assert.assertBeanEquals;
>
>        public void testSelectAll() {
>                List<UserInfo> result = this.userInfoDao.selectAll();
>                assertBeanEquals(ctx.getExpected(), result);
>        }
>
>        public void testSelectById() {
>                UserInfo result = this.userInfoDao.selectById("hogehoge");
>                assertBeanEquals(ctx.getExpected(), result);
>        }
>
>> -----Original Message-----
>> From: [E-MAIL ADDRESS DELETED]
>> [mailto:[E-MAIL ADDRESS DELETED]] On Behalf Of
>> [E-MAIL ADDRESS DELETED]
>> Sent: Thursday, March 29, 2007 10:49 PM
>> To: [E-MAIL ADDRESS DELETED]
>> Subject: [Seasar-user:6968] S2JUnit4$B$G(BExcel$B%U%!%$%k$N4|BTCM$r;HMQ(B
>>
>> $B>>86$G$9!#(B
>>
>> $B!!BgJQ?=$7Lu$4$6$$$^$;$s$,!"(BS2JUnit4$B$K$F(BExcel$B%U%!%$%k$N4|BTCM(B
>> $B$r;HMQ$7$?>l9g$K0J2<$N$h$&$JHf3S$O$I$N$h$&$K$9$l$P<B8=$G$-$k$+(B
>> $B$465<(D:$1$J$$$G$7$g$&$+!#(B
>>
>> $B!!(BTestContext ctx;
>>
>>   Page$B%/%i%9(B.$B%G!<%?<hF@%a%=%C%I(B();
>>   $B!!(B(Page$B%/%i%9$G(BS2Dao$B$+$i%G!<%?<hF@(B $B!&!&!&(B $B-!(B)
>> $B!!!!(B($B$=$NCM$r(BList$BJQ?t$[E-MAIL ADDRESS DELETED](B $B!&!&!&(B $B-"(B)
>>
>> $B!!(BassertEquals($B-"$N(BList$B7?(B, ctx.getExpected);
>>
>> $B!!$N$h$&$J$3$H$r8!>Z$7$?$$$N$G$9$,!"$&$^$/$$$-$^$;$s!#(B
>> $B!!-"$N(BEntity$B%/%i%9$H$NHf3S$G$"$l$[E-MAIL ADDRESS DELETED]>o$KF0:n$7!"-"$N(B
>> $B!!Hf3S$r>iD9$K$J$j$^$9$,0J2<$N$h$&$K#19`L\C10L$GHf3S$9(B
>> $B!!$l$P!"Hf3S$O$G$-$^$9$,!"0c$&$H;W$$$^$9!#(B
>>
>> $B!!(BassertEquals($B-"(B[i].getXxx(),
>> ctx.getExpected().getTable("x").getRow[i].getValue(0).toString());
>>
>> $[E-MAIL ADDRESS DELETED]$JJ}K!$r$465<(D:$1$k$H9,$$$G$9!#59$7$/$*4j$$CW$7$^$9!#(B
>>
>> $B0J>e$G$9!#(B
>


Seasar-user メーリングリストの案内