/* Ċ Ġ* ĠCreated Ġby ĠLee ĠOh ĠHy ung Ġon Ġ 2 0 2 0 / 1 0 / 0 1 . Ċ Ġ*/ Ċ package Ġkr . o hy ung . local . mapper Ċ Ċ import Ġkr . o hy ung . local . mock . Mock Local Data Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġkotlin . test . assertEquals Ċ Ċ class ĠBook mark Mapper Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbookmark Mapper : ĠBook mark Mapper ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġbookmark Mapper Ġ= ĠBook mark Mapper () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Bookmark Mapper Ġto DataModel ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbookmark Room Object Ġ= ĠMock Local Data . bookmark Room Object ĊĠĠĠĠĠĠĠ Ġval Ġbookmark DataModel Ġ= Ġbookmark Mapper . to DataModel ( room Object Ġ= Ġbookmark Room Object ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠBook mark Mapper Ġë ¥ ¼ ĠíĨµíķ´ Ġë³Ģ íĻĺ íķľ Ġdata Model Ġê³¼ Ġìĭ¤ ìłľ Ġdata Model Ġê°ĻìĿĢ ì§Ģ Ġë¹Ħ êµ Ĳ ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark DataModel . id , Ġactual Ġ= Ġbookmark DataModel . id ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark DataModel . description , Ġactual Ġ= Ġbookmark DataModel . description ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark DataModel . thumbnail , Ġactual Ġ= Ġbookmark DataModel . thumbnail ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark DataModel . likes , Ġactual Ġ= Ġbookmark DataModel . likes ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark DataModel . username , Ġactual Ġ= Ġbookmark DataModel . username ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Bookmark Mapper Ġto Room Object ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbookmark DataModel Ġ= ĠMock Local Data . bookmark DataModel ĊĠĠĠĠĠĠĠ Ġval Ġbookmark Room Object Ġ= Ġbookmark Mapper . to Room Object ( data Model Ġ= Ġbookmark DataModel ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠBook mark Mapper Ġë ¥ ¼ ĠíĨµíķ´ Ġë³Ģ íĻĺ íķľ ĠRoom Object ĠìĻ Ģ Ġìĭ¤ ìłľ ĠRoom Object Ġê°ĻìĿĢ ì§Ģ Ġë¹Ħ êµ Ĳ ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Object . id , Ġactual Ġ= Ġbookmark Room Object . id ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Object . description , Ġactual Ġ= Ġbookmark Room Object . description ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Object . thumbnail , Ġactual Ġ= Ġbookmark Room Object . thumbnail ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Object . likes , Ġactual Ġ= Ġbookmark Room Object . likes ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Object . username , Ġactual Ġ= Ġbookmark Room Object . username ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Bookmark Mapper Ġto Data Models ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbookmark Room Objects Ġ= ĠMock Local Data . bookmark Room Objects ĊĠĠĠĠĠĠĠ Ġval Ġbookmark Data Models Ġ= Ġbookmark Mapper . to Data Models ( room Objects Ġ= Ġbookmark Room Objects ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠBook mark Mapper Ġë ¥ ¼ ĠíĨµíķ´ Ġë³Ģ íĻĺ íķľ Ġë¦¬ ìĬ¤íĬ¸ ìĻĢ Ġìĭ¤ ìłľ Ġë¦¬ ìĬ¤íĬ¸ ê°Ģ Ġê°ĻìĿĢ ì§Ģ Ġë¹Ħ êµ Ĳ ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Data Models . first (). id , Ġactual Ġ= Ġbookmark Data Models . first (). id ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Data Models . first (). description , Ġactual Ġ= Ġbookmark Data Models . first (). description ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Data Models . first (). thumbnail , Ġactual Ġ= Ġbookmark Data Models . first (). thumbnail ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Data Models . first (). likes , Ġactual Ġ= Ġbookmark Data Models . first (). likes ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Data Models . first (). username , Ġactual Ġ= Ġbookmark Data Models . first (). username ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Bookmark Mapper Ġto Room Objects ĠTest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbookmark Data Models Ġ= ĠMock Local Data . bookmark Data Models ĊĠĠĠĠĠĠĠ Ġval Ġbookmark Room Objects Ġ= Ġbookmark Mapper . to Room Objects ( data Models Ġ= Ġbookmark Data Models ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠBook mark Mapper Ġë ¥ ¼ ĠíĨµíķ´ Ġë³Ģ íĻĺ íķľ ĠRoom Objects Ġë¦¬ ìĬ¤íĬ¸ ìĻĢ Ġìĭ¤ ìłľ ĠRoom Objects Ġë¦¬ ìĬ¤íĬ¸ ê°Ģ Ġê°ĻìĿĢ ì§Ģ Ġë¹Ħ êµ Ĳ ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Objects . first (). id , Ġactual Ġ= Ġbookmark Room Objects . first (). id ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Objects . first (). description , Ġactual Ġ= Ġbookmark Room Objects . first (). description ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Objects . first (). thumbnail , Ġactual Ġ= Ġbookmark Room Objects . first (). thumbnail ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Objects . first (). likes , Ġactual Ġ= Ġbookmark Room Objects . first (). likes ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( expected Ġ= ĠMock Local Data . bookmark Room Objects . first (). username , Ġactual Ġ= Ġbookmark Room Objects . first (). username ) ĊĠĠĠ Ġ} Ċ } Ċ