package Ġnet . rom . exchange . presentation . mapper Ċ Ċ import Ġnet . rom . exchange . domain . model . rom . All Ċ import Ġnet . rom . exchange . presentation . factory . Item Exchange Factory Ċ import Ġnet . rom . exchange . presentation . mapper . rom . All View Mapper Ċ import Ġnet . rom . exchange . presentation . mapper . rom . Data Item View Mapper Ċ import Ġnet . rom . exchange . presentation . model . rom . All View Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . junit . runners . JUnit 4 Ċ Ċ @ RunWith ( JUnit 4 :: class ) Ċ class ĠAll Entity Mapper Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġall View Mapper : ĠAll View Mapper ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġall View Mapper Ġ= ĠAll View Mapper ( Data Item View Mapper ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmap From Data Maps View () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠG IV EN ĊĠĠĠĠĠĠĠ Ġval Ġdomain Ġ= ĠItem Exchange Factory . make All () ĊĊĠĠĠĠĠĠĠ Ġ// ĠWHEN ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= Ġall View Mapper . map To View ( domain ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠTHEN ĊĠĠĠĠĠĠĠ Ġassert Data Equality ( domain , Ġview ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġassert Data Equality ( domain : ĠAll , Ġview : ĠAll View ) Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( domain . data . size , Ġview . data . size ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( domain . change , Ġview . change , Ġ 0 . 0 ) ĊĠĠĠ Ġ} Ċ }