package Ġcom . ascending . games . id 1 . edit . board Ċ Ċ import Ġcom . ascending . games . id 1 . model . board .* Ċ import Ġcom . ascending . games . engine . model . geometry . Coord 2 Ċ import Ġorg . hamcrest . Core Matchers .* Ċ import Ġorg . junit . Assert .* Ċ import Ġorg . junit . Test Ċ Ċ class ĠDefault Room Factory Test Ġ{ ĊĊĠĠĠ Ġval Ġtest Room Shape Ġ= ĠRoom Shape ( listOf ( Coord 2 ( 0 , 0 ))) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcreate Room () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtest Room Factory Config Ġ= ĠDefault Room Factory Config ( listOf ( test Room Shape )) ĊĠĠĠĠĠĠĠ Ġval Ġdefault Room Factory Ġ= ĠDefault Room Factory ( test Room Factory Config , Ġ 1 ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 0 , Ġdefault Room Factory . num Created Rooms ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġdefault Room Factory . level ) ĊĠĠĠĠĠĠĠ Ġval Ġroom Ġ= Ġdefault Room Factory . create Room () ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġdefault Room Factory . num Created Rooms ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġroom . room Elements . size ) ĊĠĠĠĠĠĠĠ ĠassertThat ( room . all Room Clear ables , Ġnot ( has Item ( is A ( Cr ystal :: class . java )))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcreate Room With Monster () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtest Room Factory Config Ġ= ĠDefault Room Factory Config ( listOf ( test Room Shape ), Ġnumber Mon sters Ġ= Ġ 1 .. 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġdefault Room Factory Ġ= ĠDefault Room Factory ( test Room Factory Config , Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġroom Ġ= Ġdefault Room Factory . create Room () ĊĠĠĠĠĠĠĠ ĠassertThat ( room . all Room Clear ables , Ġhas Item ( is A ( Monster :: class . java ))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcreate Room With Do ors () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtest Room Factory Config Ġ= ĠDefault Room Factory Config ( listOf ( test Room Shape ), Ġnumber Do ors Ġ= Ġ 1 .. 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġdefault Room Factory Ġ= ĠDefault Room Factory ( test Room Factory Config , Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġroom Ġ= Ġdefault Room Factory . create Room () ĊĠĠĠĠĠĠĠ ĠassertEquals ( room . room Elements [ 0 ]. closed W alls . size , Ġ 3 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcreate Room With Cr ystal () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtest Room Factory Config Ġ= ĠDefault Room Factory Config ( listOf ( test Room Shape ), Ġprob He aling Cr ystal Ġ= Ġ 1 f ) ĊĠĠĠĠĠĠĠ Ġval Ġdefault Room Factory Ġ= ĠDefault Room Factory ( test Room Factory Config , Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġroom Ġ= Ġdefault Room Factory . create Room () ĊĠĠĠĠĠĠĠ ĠassertThat ( room . all Room Clear ables , Ġhas Item ( is A ( Cr ystal :: class . java ))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcreate Room With St airs Down () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtest Room Factory Config Ġ= ĠDefault Room Factory Config ( listOf ( test Room Shape ), Ġprob St airs Down Ġ= Ġ 1 f , Ġmin Rooms T ill St airs Down Ġ= Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġdefault Room Factory Ġ= ĠDefault Room Factory ( test Room Factory Config , Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġroom 0 Ġ= Ġdefault Room Factory . create Room () ĊĠĠĠĠĠĠĠ ĠassertTrue ( room 0 . all Room Clear ables . isEmpty ()) ĊĠĠĠĠĠĠĠ Ġval Ġroom 1 Ġ= Ġdefault Room Factory . create Room () ĊĠĠĠĠĠĠĠ ĠassertThat ( room 1 . all Room Clear ables , Ġhas Item ( is A ( St airs Down :: class . java ))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcreate Room WithType () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtest Room Factory Config Ġ= ĠDefault Room Factory Config ( listOf ( test Room Shape ), Ġroom Type Min Levels Ġ= Ġmutable Map Of ( Room Type . D ANG ER _ HIGH Ġto Ġ 1 ), Ġroom Type Prior ities Ġ= Ġmutable Map Of ( Room Type . D ANG ER _ HIGH Ġto Ġ 1 )) ĊĠĠĠĠĠĠĠ Ġval Ġdefault Room Factory Ġ= ĠDefault Room Factory ( test Room Factory Config , Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġval Ġroom Ġ= Ġdefault Room Factory . create Room () ĊĠĠĠĠĠĠĠ ĠassertEquals ( Room Type . D ANG ER _ HIGH , Ġroom . type ) ĊĠĠĠ Ġ} Ċ }