package Ġnl . ent re co . domain . model Ċ Ċ import Ġnl . ent re co . domain . play . Score Estimator Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Test Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġentre co Ġon Ġ 2 8 / 0 1 / 2 0 1 8 . Ċ Ġ*/ Ċ class ĠTurn At Finish Test { ĊĊĠĠĠ Ġprivate Ġval Ġestimator Ġ= ĠScore Estimator () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġcorrect Ġfor ĠDart s Ġat ĠFinish Ġ( 2 )` () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . DOUBLE _ 1 ), Ġestimator . guess ( 2 , Ġfalse ). set D arts Used For Finish ( 1 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . ZERO , ĠDart . DOUBLE _ 1 ), Ġestimator . guess ( 2 , Ġfalse ). set D arts Used For Finish ( 2 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . ZERO , ĠDart . ZERO , ĠDart . DOUBLE _ 1 ), Ġestimator . guess ( 2 , Ġfalse ). set D arts Used For Finish ( 3 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġcorrect Ġfor ĠDart s Ġat ĠFinish Ġ( 3 )` () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . SINGLE _ 1 , ĠDart . DOUBLE _ 1 ), Ġestimator . guess ( 3 , Ġfalse ). set D arts Used For Finish ( 2 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . SINGLE _ 1 , ĠDart . ZERO , ĠDart . DOUBLE _ 1 ), Ġestimator . guess ( 3 , Ġfalse ). set D arts Used For Finish ( 3 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġcorrect Ġfor ĠDart s Ġat ĠFinish Ġ( 2 1 )` () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . SINGLE _ 5 , ĠDart . DOUBLE _ 8 ), Ġestimator . guess ( 2 1 , Ġfalse ). set D arts Used For Finish ( 2 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . SINGLE _ 5 , ĠDart . ZERO , ĠDart . DOUBLE _ 8 ), Ġestimator . guess ( 2 1 , Ġfalse ). set D arts Used For Finish ( 3 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` it Ġshould Ġcorrect Ġfor ĠDart s Ġat ĠFinish Ġ( 2 0 )` () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . DOUBLE _ 1 0 ), Ġestimator . guess ( 2 0 , Ġfalse ). set D arts Used For Finish ( 1 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . ZERO , ĠDart . DOUBLE _ 1 0 ), Ġestimator . guess ( 2 0 , Ġfalse ). set D arts Used For Finish ( 2 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Turn ( Dart . ZERO , ĠDart . ZERO , ĠDart . DOUBLE _ 1 0 ), Ġestimator . guess ( 2 0 , Ġfalse ). set D arts Used For Finish ( 3 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠIllegalStateException :: class ) ĊĠĠĠ Ġfun Ġ` it Ġshould Ġthrow Ġif Ġimpossible Ġcombination Ġ( 2 1 Ġin Ġ 1 )` () Ġ{ ĊĠĠĠĠĠĠĠ Ġestimator . guess ( 2 1 , Ġfalse ). set D arts Used For Finish ( 1 ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠIllegalStateException :: class ) ĊĠĠĠ Ġfun Ġ` it Ġshould Ġthrow Ġif Ġimpossible Ġcombination Ġ( 3 Ġin Ġ 1 )` () Ġ{ ĊĠĠĠĠĠĠĠ Ġestimator . guess ( 3 , Ġfalse ). set D arts Used For Finish ( 1 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠIllegalStateException :: class ) ĊĠĠĠ Ġfun Ġ` it Ġshould Ġthrow Ġfor Ġn ons ense Ġnumber Ġof Ġd arts Ġused Ġ( negative )` () Ġ{ ĊĠĠĠĠĠĠĠ Ġestimator . guess ( 2 0 , Ġfalse ). set D arts Used For Finish (- 1 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠIllegalStateException :: class ) ĊĠĠĠ Ġfun Ġ` it Ġshould Ġthrow Ġfor Ġn ons ense Ġnumber Ġof Ġd arts Ġused Ġ( gt Ġ 3 )` () Ġ{ ĊĠĠĠĠĠĠĠ Ġestimator . guess ( 2 0 , Ġfalse ). set D arts Used For Finish ( 4 ) ĊĠĠĠ Ġ} Ċ }