package Ġcom . samples . push er Ċ Ċ import Ġcom . samples . push er . core . Snippet Manager Ċ import Ġorg . junit . jupiter . api . Assertions Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġkotlin . io . path . create Temp Directory Ċ Ċ class ĠSn ippet Mng Test Ġ{ ĊĠ Ġ@ Test ĊĠ Ġfun Ġ` adding Ġnew Ġsamples `() Ġ{ ĊĠĠĠ Ġval Ġtemp Dir Ġ= Ġcreate Temp Directory (" test "). to File () ĊĠĠĠ Ġval Ġsnippet Mng Ġ= ĠSn ippet Manager ( temp Dir ) ĊĊĠĠĠ Ġsnippet Mng . add Snippet (" code 1 ", Ġ" samples / test 1 . md ") ĊĠĠĠ Ġsnippet Mng . add Snippet (" code 2 ", Ġ" samples / test 1 . md ") ĊĊĠĠĠ ĠAssertions . assertEquals (" test 1 ", Ġtemp Dir . list ()[ 0 ]) ĊĠĠĠ ĠAssertions . assertEquals ( 2 , Ġtemp Dir . resolve (" test 1 "). list (). size ) ĊĊĠĠĠ Ġsnippet Mng . add Snippet (" code 3 ", Ġ" samples / test 2 . md ") ĊĠĠĠ Ġsnippet Mng . add Snippet (" code 4 ", Ġ" samples / test 3 . md ") ĊĠĠĠ ĠAssertions . assertEquals ( 3 , Ġtemp Dir . list (). size ) ĊĊĠĠĠ Ġsnippet Mng . removeAll Snippets (" samples / test 3 . md ") ĊĠĠĠ ĠAssertions . assertEquals ( 2 , Ġtemp Dir . list (). size ) ĊĠ Ġ} Ċ }