package Ġcom . xr pn . immutable . f ik set test Ċ Ċ import Ġcom . xr pn . im api . IM KA Set NotEmpty Ċ import Ġcom . xr pn . im api . IM X Set NotEmpty Ċ import Ġcom . xr pn . immutable . empty ArrayOf Str Ċ import Ġcom . xr pn . immutable . FK Set Ċ import Ġio . kot est . assertions . throw ables . should Throw Ċ import Ġio . kot est . core . spec . style . Fun Spec Ċ import Ġio . kot est . matchers . shouldBe Ċ import Ġio . kot est . matchers . should Not Be Ċ Ċ private Ġval Ġstr I Set Of None Ġ= ĠFK Set . of i (* empty ArrayOf Str ) Ċ private Ġval Ġstr I Set Of One Ġ= ĠFK Set . of i (" 1 "). ne () !! Ċ private Ġval Ġstr I Set Of Two Ġ= ĠFK Set . of i (" 1 ", Ġ" 2 "). ne () !! Ċ private Ġval Ġstr I Set Of Three Ġ= ĠFK Set . of i (" 1 ", Ġ" 2 ", Ġ" 3 "). ne () !! Ċ Ċ private Ġval Ġstr KK Set Of One : ĠI MX Set NotEmpty < String > Ġ= ĠFK Set . of k (" 1 "). nex () !! Ċ private Ġval Ġstr KK Set Of Two : ĠI MX Set NotEmpty < String > Ġ= ĠFK Set . of k (" 1 ", Ġ" 2 "). nex () !! Ċ Ċ class ĠF IK Set Alter ing Test Ġ: ĠFun Spec ({ ĊĊĠĠĠ Ġbefore Test Ġ{} ĊĊĠĠĠ Ġtest (" f addItem ") Ġ{ ĊĠĠĠĠĠĠĠ Ġshould Throw < Class CastException > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Suppress (" UN CHECK ED _ CAST ") Ġ( str I Set Of None Ġas ĠI MK A Set NotEmpty < Int , ĠString >) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ(@ Suppress (" UN CHECK ED _ CAST ") Ġ( str I Set Of One . f addItem (" 2 ") Ġas ĠI MK A Set NotEmpty < Int , ĠString > )). strong Equal ( str I Set Of Two ) ĠshouldBe Ġtrue ĊĠĠĠĠĠĠĠ Ġ(@ Suppress (" UN CHECK ED _ CAST ") Ġ( str I Set Of Two . f addItem (" 3 ") Ġas ĠI MK A Set NotEmpty < Int , ĠString > )). strong Equal ( str I Set Of Three ) ĠshouldBe Ġtrue ĊĠĠĠĠĠĠĠ Ġstr I Set Of One . f addItem (" 2 "). equal ( str I Set Of Two ) ĠshouldBe Ġtrue ĊĠĠĠĠĠĠĠ Ġstr I Set Of Two . f addItem (" 3 "). equal ( str I Set Of Three ) ĠshouldBe Ġtrue ĊĠĠĠĠĠĠĠ Ġstr I Set Of Three . f addItem (" 4 "). f size () ĠshouldBe Ġ 4 ĊĊĠĠĠĠĠĠĠ Ġstr KK Set Of One . f addItem (" 2 "). equal ( str I Set Of Two ) ĠshouldBe Ġtrue ĊĠĠĠĠĠĠĠ Ġstr KK Set Of Two . f addItem (" 3 "). equal ( str I Set Of Three ) ĠshouldBe Ġtrue ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġtest (" f addItem Ġon Ġempty ") Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaux 1 Ġ= Ġstr I Set Of None . f addItem (" 1 ") ĊĠĠĠĠĠĠĠ Ġaux 1 . equals ( str I Set Of One ) Ġ ĠshouldBe Ġtrue ĊĠĠĠĠĠĠĠ Ġ( aux 1 Ġ=== Ġstr I Set Of One ) ĠshouldBe Ġfalse ĊĠĠĠĠĠĠĠ Ġaux 1 . ner () Ġshould Not Be Ġnull ĊĠĠĠĠĠĠĠ Ġaux 1 . ne () Ġshould Not Be Ġnull ĊĠĠĠĠĠĠĠ Ġaux 1 . nex < String >() ĠshouldBe Ġnull ĊĠĠĠ Ġ} Ċ }) Ċ