/* Ċ Ġ* ĠCreated Ġby ĠLee ĠOh ĠHy ung Ġon Ġ 2 0 2 0 / 0 9 / 2 1 . Ċ Ġ*/ Ċ package Ġkr . o hy ung . remote . mapper Ċ Ċ import Ġkr . o hy ung . remote . mock . Mock Data Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assertNot Equals Ċ Ċ internal Ġclass ĠPh otos Response Mapper Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġphotos Response Mapper : ĠPh otos Response Mapper ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġphotos Response Mapper Ġ= ĠPh otos Response Mapper () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Photos Response Mapper Ġto DataModel ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġget Photos Response Ġ= ĠMock Data . get Photos Response ĊĠĠĠĠĠĠĠ Ġval Ġphoto Summary DataModel Ġ= Ġphotos Response Mapper . to DataModel ( response Ġ= Ġget Photos Response ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary DataModel . id , Ġphoto Summary DataModel . id ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary DataModel . width , Ġphoto Summary DataModel . height ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary DataModel . color , Ġphoto Summary DataModel . color ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary DataModel . description , Ġphoto Summary DataModel . description ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary DataModel . thumbnail , Ġphoto Summary DataModel . thumbnail ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary DataModel . likes , Ġphoto Summary DataModel . likes ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary DataModel . username , Ġphoto Summary DataModel . username ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Photo Response Mapper Ġto Data Models ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġget Photos Responses Ġ= ĠMock Data . get Photos Responses ĊĠĠĠĠĠĠĠ Ġval Ġphoto Summary Data Models Ġ= Ġphotos Response Mapper . to Data Models ( responses Ġ= Ġget Photos Responses ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠMock Data ĠìĹĲ ĠìĦł ìĸ¸ íķľ ĠData Models ĠìĿĺ Ġì² « ë²Ī ì§¸ ĠìķĦ ìĿ´ íħľ ( ê¸° ëĮĢ ê°Ĵ ) ê³¼ , ĠMapper Ġë ¥ ¼ ĠíĨµ íķ´ìĦľ Ġë³Ģ íĻĺ ëĲľ Ġë¦¬ ìĬ¤íĬ¸ ìĿĺ Ġì² « ë²Ī ì§¸ ĠìķĦ ìĿ´ íħľ ( ìĭ¤ ìłľ ê°Ĵ ) ìĿ´ Ġê°ĻìĿĢ ì§Ģ ĠíĻķìĿ¸ ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (), Ġphoto Summary Data Models . first ()) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (). id , Ġphoto Summary Data Models . first (). id ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (). width , Ġphoto Summary Data Models . first (). width ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (). color , Ġphoto Summary Data Models . first (). color ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (). description , Ġphoto Summary Data Models . first (). description ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (). thumbnail , Ġphoto Summary Data Models . first (). thumbnail ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (). likes , Ġphoto Summary Data Models . first (). likes ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Mock Data . photo Summary Data Models . first (). username , Ġphoto Summary Data Models . first (). username ) ĊĊĠĠĠĠĠĠĠ Ġassert Not Equals ( Mock Data . photo Summary Data Models . first (), Ġphoto Summary Data Models . first (). copy ( id Ġ= Ġ" ëĭ¤ ë¥¸ ĠId ")) ĊĠĠĠĠĠĠĠ Ġassert Not Equals ( Mock Data . photo Summary Data Models . first (), Ġphoto Summary Data Models . first (). copy ( username Ġ= Ġ" ëĭ¤ ë¥¸ ĠìĤ¬ ëŀ Į ")) ĊĠĠĠ Ġ} Ċ } Ċ