/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 1 9 ĠJetBrains Ġs . r . o . Ġand ĠKotlin ĠProgramming ĠLanguage Ġcontributors . Ċ Ġ* ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe Ġlicense / LICENSE . txt Ġfile . Ċ Ġ*/ Ċ Ċ package Ġkotlin . script . experimental . test Ċ Ċ import Ġjunit . framework . TestCase Ċ import Ġorg . junit . Test Ċ import Ġkotlin . script . experimental . host . Script ing Host Configuration Ċ import Ġkotlin . script . experimental . host . Script ing Host Configuration Keys Ċ import Ġkotlin . script . experimental . host . with Defaults From Ċ import Ġkotlin . script . experimental . util . Properties Collection Ċ Ċ class ĠConfigur ations Test Ġ: ĠTestCase () Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Host Config With Defaults From () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġc 0 Ġ= ĠScript ing Host Configuration () ĊĠĠĠĠĠĠĠ Ġval Ġc 1 Ġ= ĠScript ing Host Configuration Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġp 1 ( 1 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġval Ġc 2 Ġ= ĠScript ing Host Configuration Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġp 1 ( 2 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġp 2 (" yes ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( c 1 , Ġc 1 . with Defaults From ( c 0 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( c 1 , Ġc 0 . with Defaults From ( c 1 )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( c 1 , Ġc 1 . with Defaults From ( c 1 )) ĊĊĠĠĠĠĠĠĠ Ġval Ġc 1 c 2 Ġ= Ġc 1 . with Defaults From ( c 2 ) ĊĠĠĠĠĠĠĠ Ġval Ġc 2 c 1 Ġ= Ġc 2 . with Defaults From ( c 1 ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġc 1 c 2 [ Script ing Host Configuration . p 1 ]) ĊĠĠĠĠĠĠĠ ĠassertEquals (" yes ", Ġc 1 c 2 [ Script ing Host Configuration . p 2 ]) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 2 , Ġc 2 c 1 [ Script ing Host Configuration . p 1 ]) ĊĠĠĠ Ġ} Ċ } Ċ Ċ private Ġval ĠScript ing Host Configuration Keys . p 1 Ġby ĠProperties Collection . key < Int >( - 1 ) Ċ private Ġval ĠScript ing Host Configuration Keys . p 2 Ġby ĠProperties Collection . key < String >(" - ") Ċ