/* ĠSpotify ĠWeb ĠAPI , ĠKotlin ĠWrapper ; ĠMIT ĠLicense , Ġ 2 0 1 7 - 2 0 2 1 ; ĠOriginal Ġauthor : ĠAdam ĠR atz man Ġ*/ Ċ package Ġcom . adam rat z man . spotify . priv Ċ Ċ import Ġcom . adam rat z man . spotify . Abstract Test Ċ import Ġcom . adam rat z man . spotify . Spot ify Client Api Ċ import Ġcom . adam rat z man . spotify . Spot ify Exception Ċ import Ġcom . adam rat z man . spotify . run Blocking Test Ċ import Ġkotlin . test . Test Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assert Fails With Ċ import Ġkotlin . test . assertFalse Ċ import Ġkotlin . test . assertNull Ċ import Ġkotlin . test . assertTrue Ċ Ċ class ĠClient Following Api Test Ġ: ĠAbstract Test < Spot ify Client Api >() Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Follow Un follow Art ists () Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsuper . build < Spot ify Client Api >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ(! test Pr ere q ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn @ run Blocking Test ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtest Artist Id Ġ= Ġ" 7 e Cm cc n Rw Pm Rn WP w 6 1 x 6 j M " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( api !!. following . is Following Artist ( test Artist Id )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . un follow Artist ( test Artist Id ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertTrue (! api !!. following . is Following Artist ( test Artist Id )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġbefore Following Ġ= Ġapi !!. following . get Follow ed Art ists (). getAll Items NotNull () ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertNull ( before Following . find Ġ{ Ġit . id Ġ== Ġtest Artist Id Ġ}) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . follow Artist ( test Artist Id ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . follow Artist ( test Artist Id ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertTrue ( api !!. following . is Following Artist ( test Artist Id )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġapi !!. following . get Follow ed Art ists (). getAll Items (). size Ġ- Ġbefore Following . size ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . un follow Artist ( test Artist Id ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . un follow Artist ( test Artist Id ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertEquals ( before Following . size , Ġapi !!. following . get Follow ed Art ists (). getAll Items (). size ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertTrue (! api !!. following . is Following Artist ( test Artist Id )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert Fails With < Spot ify Exception . BadRequest Exception > Ġ{ Ġapi !!. following . is Following Artist (" no Ġu ") Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert Fails With < Spot ify Exception . BadRequest Exception > Ġ{ Ġapi !!. following . follow Artist (" no Ġu ") Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert Fails With < Spot ify Exception . BadRequest Exception > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . follow Art ists ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtest Artist Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" no Ġu " ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert Fails With < Spot ify Exception . BadRequest Exception > Ġ{ Ġapi !!. following . un follow Artist (" no Ġu ") Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Follow Un follow Users () Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsuper . build < Spot ify Client Api >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ(! test Pr ere q ()) Ġreturn @ run Blocking Test Ġelse Ġapi !! ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtest UserId Ġ= Ġ" adam rat z man " ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( api !!. following . is Following User ( test UserId )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . un follow User ( test UserId ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . follow User ( test UserId ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertTrue ( api !!. following . is Following User ( test UserId )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . un follow User ( test UserId ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertFalse ( api !!. following . is Following User ( test UserId )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Follow Un follow Play lists () Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrun Blocking Test Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsuper . build < Spot ify Client Api >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ(! test Pr ere q ()) Ġreturn @ run Blocking Test Ġelse Ġapi !! ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplaylist Id Ġ= Ġ" 3 7 i 9 d Q ZF 1 DX c BW IG o Y BM 5 M " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( api !!. following . is Following Playlist ( playlist Id )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . un follow Playlist ( playlist Id ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertFalse ( api !!. following . is Following Playlist ( playlist Id )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . follow Playlist ( playlist Id ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertTrue ( api !!. following . is Following Playlist ( playlist Id )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert Fails With < Spot ify Exception . BadRequest Exception > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapi !!. following . is Following Playlist ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Ġno Ġu ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" no Ġu " ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert Fails With < Spot ify Exception . BadRequest Exception > Ġ{ Ġapi !!. following . un follow Playlist (" no - u ") Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert Fails With < Spot ify Exception . BadRequest Exception > Ġ{ Ġapi !!. following . follow Playlist (" n ou ") Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ