package Ġcom . nab . data . mapper Ċ Ċ import Ġcom . nab . data . constants . CEL SI US _ SYMBOL Ċ import Ġcom . nab . data . get Forecast Response Ċ import Ġcom . nab . data . get Temperature Response Ċ import Ġcom . nab . domain . models . Weather Info Ċ import Ġorg . junit . Test Ċ Ċ class ĠFore cast Mapper Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` verify Ġmapper ĠFore Cast Response Ġto ĠWeather Info Ġcorrectly ` (){ ĊĠĠĠĠĠĠĠ Ġval Ġforecast Response Ġ= Ġget Forecast Response () ĊĠĠĠĠĠĠĠ Ġval Ġexpect Weather Info Ġ= ĠWeather Info ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtime Ġ= Ġ" Sat , Ġ 1 5 ĠMay Ġ 2 0 2 1 ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġaverage Temperature Ġ= Ġ" 1 5 . 0 Ġ$ CEL SI US _ SYMBOL ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpressure Ġ= Ġ" 1 0 0 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġhum idity Ġ= Ġ" 7 0 0 %", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdescription Ġ= Ġ" description 0 , Ġdescription 1 " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġval Ġactual Weather Info Ġ= Ġforecast Response . to Weather Info () ĊĊĠĠĠĠĠĠĠ Ġassert ( expect Weather Info . time Ġ== Ġactual Weather Info . time ) ĊĠĠĠĠĠĠĠ Ġassert ( expect Weather Info . average Temperature Ġ== Ġactual Weather Info . average Temperature ) ĊĠĠĠĠĠĠĠ Ġassert ( expect Weather Info . pressure Ġ== Ġactual Weather Info . pressure ) ĊĠĠĠĠĠĠĠ Ġassert ( expect Weather Info . humidity Ġ== Ġactual Weather Info . humidity ) ĊĠĠĠĠĠĠĠ Ġassert ( expect Weather Info . description Ġ== Ġactual Weather Info . description ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` verify Ġformat Ġtime Ġin Ġmilliseconds Ġto Ġstring Ġcorrectly ` (){ ĊĠĠĠĠĠĠĠ Ġval Ġtime In Millis Ġ= Ġ 1 6 2 1 0 6 8 9 2 4 3 6 4 L ĊĠĠĠĠĠĠĠ Ġval Ġexpect Time Format Ġ= Ġ" Sat , Ġ 1 5 ĠMay Ġ 2 0 2 1 " ĊĠĠĠĠĠĠĠ Ġval Ġactual Result Ġ= Ġtime In Millis . to Time Format () ĊĠĠĠĠĠĠĠ Ġassert ( actual Result Ġ== Ġexpect Time Format ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` verify Ġformat Ġaverage Ġtemperature Ġcorrectly ` (){ ĊĠĠĠĠĠĠĠ Ġval Ġtemperature Response Ġ= Ġget Temperature Response () ĊĠĠĠĠĠĠĠ Ġval Ġexpect Format Ġ= Ġ" 1 5 . 0 Ġ$ CEL SI US _ SYMBOL " ĊĠĠĠĠĠĠĠ Ġval Ġactual Result Ġ= Ġtemperature Response . get Average Temp Display () ĊĠĠĠĠĠĠĠ Ġassert ( expect Format Ġ== Ġactual Result ) ĊĠĠĠ Ġ} Ċ }