wJavaŊwԃt@N^Ox_
\tgoNNGCeBu()
ISBN 978-4-7973-3799-0
http://www.hyuki.com/ref/
hyuki@hyuki.com

͂߂

̃A[JCuɂ́A
ЁwJavaŊwԃt@N^Ox
TvvOȂǂi[Ă܂B


fBNg\

fBNg\̊T́Aȉ̂悤ɂȂĂ܂B

    src
    +--- readme.txt (̃t@C)
    +--- ReplaceMagicNumberWithSymbolicConstant (1)
    |    +--- before
    |    |    +--- Main.java
    |    |    +--- Robot.java
    |    |    +--- MainTest.java
    |    +--- after
    |    |    +--- Main.java
    |    |    +--- Robot.java
    |    |    +--- MainTest.java
    |    +--- ....
    +--- RemoveControlFlag  (2)
    +--- IntroduceAssertion  (3)
    +--- IntroduceNullObject  (4)
    +--- ExtractMethod  (5)
    +--- ExtractClass  (6)
    +--- ReplaceTypeCodeWithClass  (7)
    +--- ReplaceTypeCodeWithSubclasses  (8)
    +--- ReplaceTypeCodeWithStateStrategy  (9)
    +--- ReplaceErrorCodeWithException  (10)
    +--- ReplaceConstructorWithFactoryMethod  (11)
    +--- DuplicateObservedData  (12)
    +--- ReplaceInheritanceWithDelegation (13)
    +--- HideDelegate  (14)
    +--- TeaseApartInheritance  (15)
    +--- UnitTest (t^B)
    |    +--- sample
    |    |    +--- Person.java
    |    |    +--- PersonTest.java
    |    +--- failure
    |         +--- Person.java
    |         +--- PersonTest.java
    +--- com
         +--- hyuki
              +--- refbook
                   +--- StandardOutputTest.java (e͂MainTest.javagp)


RpCƎs@

{ł́Ap҂̗邽߁A
TvvO𓮍삳N_ƂȂNXɂ́A
KMainƂOĂ܂(t^B͏܂)B
܂AMainNXi[Ăt@CMain.javaɂȂĂ܂B

R}hCŃRpCюssɂ́A
Main.java܂ރfBNgŁAȉ̃R}hs܂B

    javac Main.java
    java Main

sʂ́AЂQƂĂB


eXg@

{̒ł͐GĂ܂񂪁A
TvvOJUnitŃeXg邽߂̃NXɂ́A
KMainTestƂOĂ܂(t^B͏܂)B
܂AMainTestNXi[Ăt@CMainTest.javaɂȂĂ܂B

StandardOutputTest́A
Wo͂ɏoꂽeXg邽߂̃NXłB
StandardOutputTestNX́AA[JCu
src/com/hyuki/refbook/StandardOutputTest.java
Ɋi[Ă܂B

R}hCŃeXgsɂ́AJUnit 4.1KvłB
JUnit 4.1̃CXg[ɂĂ͏ЂQƂĂB
ȉłjunit-4.1.jarC:\work\junit4.1\junit-4.1.jarɂƂĐ܂B

Windows̏ꍇA
MainTest.java܂ރfBNgŁAȉ̃R}hs܂B

    javac -classpath ".;../..;C:/work/junit4.1/junit-4.1.jar" MainTest.java
    java -classpath ".;../..;C:/work/junit4.1/junit-4.1.jar" org.junit.runner.JUnitCore MainTest

ӁFNXpXɂ ../.. ܂߂ĂBɂāAMainTest.javaŎgpĂ
com.hyuki.refbook.StandardOutputTestNX̒uꏊw肵Ă邱ƂɂȂ܂B

UNIX̏ꍇɂ͏LR}hC ;  : ɓǂݑւĂB


̑

A[JCu̒ɂ́A̓sA
RpCG[ɂȂ̂⓮G[ɂȂ̂܂܂Ă܂B
ڍׂ͏ЂQƂĂB

efBNgMainTest.javaɊ܂܂ĂeXǵA
TvƂĊ܂߂̂łA\Ȍ͂܂B


쌠ƃCZX

̃A[JCuɊ܂܂Ăt@C
ȉThe zlib/libpng License
ɏ]Ď舵ĂB

Copyright (C) 2007 Hiroshi Yuki.
http://www.hyuki.com/ref/
hyuki@hyuki.com

This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is not
required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.

iȉAQlj
̃\tgEFA͌̂܂ܒ񋟂̂łA
Iɂ邢͈Öق̂ɂǂȕۏ؂ȂB
̃\tgEFAgƂɂĐ邢Ȃ鑹Qɑ΂ĂA
҂͂܂ӔC𕉂ȂB

ȉ̐ɂāANłĂA
̃\tgEFApAvP[V܂ޔCӂ̖ړIɎgp邱ƁA
̃\tgEFAύX邱ƁAĎRɍĔzz邱ƂłB

1. ̃\tgEFA̋NĒ񎦂Ă͂ȂȂBȂ킿A
Ȃ͌̃\tgEFAƎ咣Ă͂ȂȂB
̃\tgEFA𐻕i̒ŎgpƂɂ́Ai̕
ӈӂƂ͊}B͕K{ł͂ȂB

2. ύX\[X̔ł͂͂Ƃꂪ킩悤ɂȂ΂Ȃ炸A
̃\tgEFAƍ悤ɂĂ͂ȂB

3. Ȃ\[XzzA̒ӏ͍폜ύX肵Ă͂ȂȂB
