package Ġchat . w ew e . android . helper Ċ Ċ import Ġorg . junit . Test Ċ import Ġkotlin . test . assertEquals Ċ Ċ class ĠUrl Helper Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġremove Uri Scheme Test () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals (" open . rocket . chat ", ĠUrl Helper . remove Uri Scheme (" https :// open . rocket . chat ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" open . rocket . chat ", ĠUrl Helper . remove Uri Scheme (" http :// open . rocket . chat ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" open . rocket . chat ", ĠUrl Helper . remove Uri Scheme (" open . rocket . chat ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget Safe Hostname Test () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals (" https :// open . rocket . chat ", ĠUrl Helper . get Safe Hostname (" https :// open . rocket . chat ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" https :// open . rocket . chat ", ĠUrl Helper . get Safe Hostname (" http :// open . rocket . chat ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" https :// open . rocket . chat ", ĠUrl Helper . get Safe Hostname (" open . rocket . chat ")) ĊĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun ĠgetUrl Test () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals (" https :// open . rocket . chat / GENERAL / file . txt ", ĠUrl Helper . get Safe Url (" https :// open . rocket . chat / GENERAL / file . txt ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" http :// open . rocket . chat / GENERAL / file . txt ", ĠUrl Helper . get Safe Url (" http :// open . rocket . chat / GENERAL / file . txt ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" open . rocket . chat / GENERAL / file . txt ", ĠUrl Helper . get Safe Url (" open . rocket . chat / GENERAL / file . txt ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" open . rocket . chat / GENERAL / a % 2 0 sample % 2 0 file . txt ", ĠUrl Helper . get Safe Url (" open . rocket . chat / GENERAL / a Ġsample Ġfile . txt ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" open . rocket . chat / GENERAL / file . txt ", ĠUrl Helper . get Safe Url (" open . rocket . chat \\/ GENERAL \\/ file . txt ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget Attachment Link Test () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals (" https :// open . rocket . chat / file - upload / a File Id / a FileName . txt ", ĠUrl Helper . get Attachment Link (" https :// open . rocket . chat ", Ġ" a File Id ", Ġ" a FileName . txt ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" https :// open . rocket . chat / file - upload / a File Id / a FileName . txt ", ĠUrl Helper . get Attachment Link (" http :// open . rocket . chat ", Ġ" a File Id ", Ġ" a FileName . txt ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" https :// open . rocket . chat / file - upload / a File Id / a FileName . txt ", ĠUrl Helper . get Attachment Link (" open . rocket . chat ", Ġ" a File Id ", Ġ" a FileName . txt ")) ĊĠĠĠ Ġ} Ċ }