package Ġio . gitlab . art urb os ch . de te kt . api Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . jetbrains . spe k . api . Spe k Ċ import Ġorg . jetbrains . spe k . api . dsl . describe Ċ import Ġorg . jetbrains . spe k . api . dsl . it Ċ Ċ /** Ċ Ġ* Ġ@ author ĠArt ur ĠB os ch Ċ Ġ*/ Ċ class ĠComposite Config Test Ġ: ĠSpe k ({ ĊĊ ĉ describe (" both Ġconfigs Ġshould Ġbe Ġconsidered ") Ġ{ Ċĉ ĉ val Ġsecond Ġ= Ġyaml Config (" composite - test . yml ") Ċĉ ĉ val Ġfirst Ġ= Ġyaml Config (" de te kt . yml ") Ċĉ ĉ val Ġcomposite Config Ġ= ĠComposite Config ( second , Ġfirst ) ĊĊĉ ĉ it (" should Ġhave Ġstyle Ġsub Ġconfig Ġwith Ġactive Ġfalse Ġwhich Ġis Ġover rid en Ġin Ġ` second ` Ġconfig ") Ġ{ Ċĉĉ ĉ val Ġstyle Config Ġ= Ġcomposite Config . sub Config (" style "). sub Config (" Wildcard Import ") Ċĉĉ ĉ assertThat ( style Config . value OrDefault (" active ", Ġtrue )). isEqualTo ( false ) Ċĉ ĉ } ĊĊĉ ĉ it (" should Ġhave Ġcode Ġs mell Ġsub Ġconfig Ġwith ĠLong Method Ġthreshold Ġ 2 0 Ġfrom Ġ` first ` Ġconfig ") Ġ{ Ċĉĉ ĉ val Ġcode S mell Config Ġ= Ġcomposite Config . sub Config (" code - s mell "). sub Config (" Long Method ") Ċĉĉ ĉ assertThat ( code S mell Config . value OrDefault (" threshold ", Ġ- 1 )). isEqualTo ( 2 0 ) Ċĉ ĉ } ĊĊĉ ĉ it (" should Ġuse Ġthe Ġdefault Ġas Ġboth Ġpart Ġconfigurations Ġdo Ġnot Ġhave Ġthe Ġvalue ") Ġ{ Ċĉĉ ĉ assertThat ( composite Config . value OrDefault (" TEST ", Ġ 4 2 )). isEqualTo ( 4 2 ) Ċĉ ĉ } Ċ ĉ } Ċ }) Ċ