package Ġcom . ro che . amb ass ador . model . extensions Ċ Ċ import Ġcom . ro che . amb ass ador . extensions . round Ċ import Ġcom . ro che . amb ass ador . model . Feature Ċ import Ġcom . ro che . amb ass ador . model . Score Ċ import Ġcom . ro che . amb ass ador . model . score . Test Calculator Ċ import Ġorg . assertj . core . api . Abstract Double Assert Ċ import Ġorg . assertj . core . api . InstanceOf Assert Factories Ċ import Ġorg . assertj . core . api . Object Assert Ċ import Ġkotlin . reflect . K Class Ċ Ċ type alias ĠScore Assert Ġ= ĠObject Assert < Score > Ċ Ċ fun ĠScore Assert . hasValue ( expected : ĠDouble ): ĠScore Assert Ġ{ ĊĠĠĠ Ġextracting Ġ{ Ġit . value () Ġ}. isEqualTo ( expected ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun ĠScore Assert . hasValue Rounded ( expected : ĠDouble , Ġdecimals : ĠInt ): ĠScore Assert Ġ{ ĊĠĠĠ Ġextracting Ġ{ Ġit . value (). round ( decimals ) Ġ}. isEqualTo ( expected . round ( decimals )) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun Ġ< T Ġ: ĠFeature <* >> ĠScore Assert . has Feature ( expected Feature Type : ĠK Class < T >): ĠScore Assert Ġ{ ĊĠĠĠ Ġextracting Ġ{ Ġit . all Features (). map Ġ{ Ġit :: class Ġ}. to Mutable List () Ġ} ĊĠĠĠĠĠĠĠ Ġ. asList () ĊĠĠĠĠĠĠĠ Ġ. contains ( expected Feature Type ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun Ġ< T Ġ: ĠFeature <* >> ĠScore Assert . has Only Feature ( expected Feature Type : ĠK Class < T >): ĠScore Assert Ġ{ ĊĠĠĠ Ġextracting Ġ{ Ġit . all Features (). map Ġ{ Ġit :: class Ġ}. to Mutable List () Ġ} ĊĠĠĠĠĠĠĠ Ġ. asList () ĊĠĠĠĠĠĠĠ Ġ. contains Exactly ( expected Feature Type ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun ĠScore Assert . has Features ( var arg Ġexpected Feature Types : ĠK Class < *> ): ĠScore Assert Ġ{ ĊĠĠĠ Ġextracting Ġ{ Ġit . all Features (). map Ġ{ Ġit :: class Ġ}. to Mutable List () Ġ} ĊĠĠĠĠĠĠĠ Ġ. asList (). contains Exactly In Any Order (* expected Feature Types ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun ĠScore Assert . has Scores Size ( expected : ĠInt ): ĠScore Assert Ġ{ ĊĠĠĠ Ġextracting Ġ{ Ġit . all Sub Scores (). to Mutable List () Ġ}. asList (). has Size ( expected ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun Ġ< T > ĠScore Assert . has Correct Value Based On Calculator ( data : ĠT , Ġcalculator : ĠTest Calculator < T >): ĠScore Assert Ġ{ ĊĠĠĠ Ġval Ġexpected Ġ= Ġcalculator . calculate ( data ) ĊĠĠĠ Ġextracting Ġ{ Ġit . value () Ġ}. isEqualTo ( expected ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun ĠScore Assert . is GreaterThan ( value : ĠDouble ): ĠScore Assert Ġ{ ĊĠĠĠ Ġwith Value (). is GreaterThan ( value ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun ĠScore Assert . is LessThan ( value : ĠDouble ): ĠScore Assert Ġ{ ĊĠĠĠ Ġwith Value (). is LessThan ( value ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ fun ĠScore Assert . is Between ( min : ĠDouble , Ġmax : ĠDouble ): ĠScore Assert Ġ{ ĊĠĠĠ Ġwith Value (). is Between ( min , Ġmax ) ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ Ċ private Ġfun ĠScore Assert . with Value (): ĠAbstract Double Assert < *> Ġ{ ĊĠĠĠ Ġreturn Ġextracting Ġ{ Ġit . value () Ġ}. asInstanceOf ( InstanceOf Assert Factories . DOUBLE ) Ċ } Ċ