package Ġcom . github . sh atter ed suite . core . util Ċ Ċ import Ġorg . junit . jupiter . api . Assertions Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ class ĠTest Manager Ġ{ ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġmanager : ĠManager < Ident ified String > ĊĠĠĠ Ġprivate Ġval Ġinitial Values : ĠList < Ident ified String > Ġ= ĠlistOf ( Ident ified String (" primary ", Ġ" First ĠValue "), ĊĠĠĠĠĠĠĠ ĠIdent ified String (" secondary ", Ġ" Second ĠValue "), ĠIdent ified String (" ter ti ary ", Ġ" Third ĠValue ")) ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġmanager Ġ= ĠManager () ĊĠĠĠĠĠĠĠ Ġfor Ġ( value Ġin Ġinitial Values ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmanager . register ( value ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġcontains `() Ġ{ ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( manager . has (" primary ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertFalse ( manager . has (" qu atern ary ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġcontains () Ġhas Ġcase Ġins ensitivity `() Ġ{ ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( manager . has (" PRIMARY ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( manager . has (" Pri Ma Ry ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertFalse ( manager . has (" QU AT ERN ARY ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġregister `() Ġ{ ĊĠĠĠĠĠĠĠ Ġmanager . register ( Ident ified String (" qu atern ary ", Ġ" Four th ĠValue ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( manager . has (" qu atern ary ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( manager . has (" QU AT ERN ARY ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( manager . has (" Qu at Er na Ry ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġget `() Ġ{ ĊĠĠĠĠĠĠĠ ĠAssertions . assertEquals (" First ĠValue ", Ġmanager . get (" primary ") !!. value ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġdelete `() Ġ{ ĊĠĠĠĠĠĠĠ Ġmanager . delete (" ter ti ary ") ĊĠĠĠĠĠĠĠ Ġmanager . delete ( initial Values [ 1 ]) ĊĠĠĠĠĠĠĠ ĠAssertions . assertFalse ( manager . has (" secondary ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertFalse ( manager . has (" ter ti ary ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test ĠgetAll `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġvalues Ġ= Ġmanager . getAll () ĊĠĠĠĠĠĠĠ Ġval Ġvalues Arr Ġ= Ġvalues . toList (). to Typed Array () ĊĠĠĠĠĠĠĠ Ġval Ġexpected Arr Ġ= Ġinitial Values . to Typed Array () ĊĠĠĠĠĠĠĠ ĠAssertions . assertArrayEquals ( values Arr , Ġexpected Arr ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġget Ids `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġvalues Ġ= Ġmanager . get Ids () ĊĠĠĠĠĠĠĠ Ġval Ġvalues Arr Ġ= Ġvalues . toList (). to Typed Array () ĊĠĠĠĠĠĠĠ Ġval Ġexpected Arr Ġ= ĠarrayOf (" primary ", Ġ" secondary ", Ġ" ter ti ary ") ĊĠĠĠĠĠĠĠ ĠAssertions . assertArrayEquals ( values Arr , Ġexpected Arr ) ĊĠĠĠ Ġ} Ċ }