package Ġcom . aut onomous apps . internal . configuration Ċ Ċ import Ġcom . aut onomous apps . model . Source Set Kind Ċ import Ġcom . aut onomous apps . model . inter medi ates . Variant Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġorg . junit . jupiter . api . DisplayName Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . params . Parameterized Test Ċ import Ġorg . junit . jupiter . params . provider . Csv Source Ċ Ċ internal Ġclass ĠConfigur ations Test Ġ{ ĊĊĠ Ġ@ DisplayName (" Configurations . is Variant () ") ĊĠ Ġ@ Parameterized Test ( name Ġ= Ġ" is Variant ({ 0 }) Ġ== Ġ{ 1 }") ĊĠ Ġ@ Csv Source ( ĊĠĠĠ Ġvalue Ġ= Ġ[ ĊĠĠĠĠĠ Ġ" debug Api , Ġtrue ", ĊĠĠĠĠĠ Ġ" release Implementation , Ġtrue ", ĊĠĠĠĠĠ Ġ" k apt Debug , Ġtrue ", ĊĠĠĠĠĠ Ġ" k apt , Ġfalse ", ĊĠĠĠĠĠ Ġ" implementation , Ġfalse ", ĊĠĠĠĠĠ Ġ" api , Ġfalse " ĊĠĠĠ Ġ] ĊĠ Ġ) ĊĠ Ġfun Ġ` is Ġvariant `( candidate : ĠString , Ġvalue : ĠBoolean ) Ġ{ ĊĠĠĠ ĠassertThat ( Configurations . is Variant ( candidate )). isEqualTo ( value ) ĊĠ Ġ} ĊĊĠ Ġ@ Parameterized Test ( name Ġ= Ġ"{ 0 } Ġ=> Ġ{ 1 }") ĊĠ Ġ@ Csv Source ( ĊĠĠĠ Ġvalue Ġ= Ġ[ ĊĠĠĠĠĠ Ġ" debug Api , Ġdebug ", ĊĠĠĠĠĠ Ġ" release Implementation , Ġrelease ", ĊĠĠĠĠĠ Ġ" k apt Debug , Ġdebug ", ĊĠĠĠĠĠ Ġ" annotation Processor Release Flavor , Ġrelease Flavor ", ĊĠĠĠĠĠ Ġ" implementation , Ġmain ", ĊĠĠĠĠĠ Ġ" api , Ġmain ", ĊĠĠĠĠĠ Ġ" annotation Processor , Ġmain ", ĊĠĠĠĠĠ Ġ" k apt , Ġmain ", ĊĠĠĠ Ġ] ĊĠ Ġ) ĊĠ Ġfun Ġ` can Ġget Ġvariant Ġfrom Ġmain Ġconfiguration Ġname `( configuration : ĠString , Ġvariant : ĠString ) Ġ{ ĊĠĠĠ ĠassertThat ( Configurations . variant From ( configuration )). isEqualTo ( Variant ( variant , ĠSource Set Kind . MAIN )) ĊĠ Ġ} ĊĊĠ Ġ@ Parameterized Test ( name Ġ= Ġ"{ 0 } Ġ=> Ġ{ 1 }") ĊĠ Ġ@ Csv Source ( ĊĠĠĠ Ġvalue Ġ= Ġ[ ĊĠĠĠĠĠ Ġ" test Debug Api , Ġdebug ", ĊĠĠĠĠĠ Ġ" test Release Implementation , Ġrelease ", ĊĠĠĠĠĠ Ġ" k apt Test Debug , Ġdebug ", ĊĠĠĠĠĠ Ġ" annotation Processor Test Release Flavor , Ġrelease Flavor ", ĊĠĠĠĠĠ Ġ" test Implementation , Ġmain ", ĊĠĠĠĠĠ Ġ" test Api , Ġmain ", ĊĠĠĠĠĠ Ġ" annotation Processor Test , Ġmain ", ĊĠĠĠĠĠ Ġ" k apt Test , Ġmain ", ĊĠĠĠ Ġ] ĊĠ Ġ) ĊĠ Ġfun Ġ` can Ġget Ġvariant Ġfrom Ġtest Ġconfiguration Ġname `( configuration : ĠString , Ġvariant : ĠString ) Ġ{ ĊĠĠĠ ĠassertThat ( Configurations . variant From ( configuration )). isEqualTo ( Variant ( variant , ĠSource Set Kind . TEST )) ĊĠ Ġ} ĊĊĠ Ġ@ Test Ġfun Ġ` variant Ġequality Ġworks `() Ġ{ ĊĠĠĠ ĠassertThat ( Variant (" main ", ĠSource Set Kind . MAIN )). isEqualTo ( Variant . MAIN ) ĊĠĠĠ ĠassertThat ( Variant (" debug ", ĠSource Set Kind . MAIN )). isNot EqualTo ( Variant . MAIN ) ĊĠ Ġ} Ċ } Ċ