package Ġio . github . cc j hr . collection Ċ Ċ import Ġio . github . cc j hr . Assertion Context Ċ import Ġio . github . cc j hr . expect NotNull Ċ import Ġkotlin . test . fail Ċ Ċ /** Ċ Ġ* ĠVerifies Ġthat Ġthe Ġ[ Collection ] Ġunder Ġtest Ġcontains Ġall Ġof Ġthe Ġgiven Ġitems . ĠIt Ġis Ġvalid Ġthat Ġthe Ġ[ Collection ] Ġunder Ċ Ġ* Ġcan Ġcontain Ġeven Ġmore Ġitems Ġwhich Ġare Ġnot Ġpart Ġof Ġ[ expected Elements ]. Ċ Ġ* Ġ@ since Ġ 1 . 1 . 0 Ċ Ġ* Ġ@ param Ġexpected Elements ĠA Ġ[ Collection ] Ġcontaining Ġitems Ġwhich Ġare Ġexpected Ġto Ġexist Ġin Ġthe Ġ[ Collection ] Ġunder Ġtest . Ċ Ġ* Ġ@ throws ĠAssertionError ĠIn Ġcase Ġthe Ġassertion Ġfails . Ċ Ġ* Ġ@ receiver ĠAny Ġnullable Ġ[ Collection ] Ġcontaining Ġany Ġnullable Ġor Ġnon - nullable Ġtype . Ċ Ġ* Ġ@ see Ġcontains None Of Ċ Ġ* Ġ@ sample Ġio . github . cc j hr . samples . collection . contains All Of Ċ Ġ*/ Ċ inline Ġin fix Ġfun Ġ< re ified ĠT > ĠAssertion Context < out ĠCollection < T > ?> . contains All Of ( expected Elements : ĠCollection < T >) Ġ{ ĊĠĠĠ Ġexpect NotNull ( this . content ) ĊĊĠĠĠ Ġval Ġdiff Ġ= Ġexpected Elements . toSet () Ġ- Ġthis . content . toSet () ĊĠĠĠ Ġif Ġ( diff . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġfail (" Expecting Ġ< ${ this . content }> Ġto Ġcontain Ġall Ġitems Ġof Ġ<$ expected Elements >, Ġbut Ġit Ġit Ġdoesn 't Ġcontain Ġ<$ diff >. ") ĊĠĠĠ Ġ} Ċ }