package Ġcom . google . devtools . k sp . test Ċ Ċ import Ġorg . gradle . test kit . runner . Gradle Runner Ċ import Ġorg . gradle . test kit . runner . Task Outcome Ċ import Ġorg . junit . Assert Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġjava . io . File Ċ import Ġjava . util . jar .* Ċ Ċ class ĠPlay ground IT Ġ{ ĊĠĠĠ Ġ@ Rule ĊĠĠĠ Ġ@ Jvm Field ĊĠĠĠ Ġval Ġproject : ĠTemporary Test Project Ġ= ĠTemporary Test Project (" playground ") ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Play ground () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġgradle Runner Ġ= ĠGradle Runner . create (). with Project Dir ( project . root ) ĊĊĠĠĠĠĠĠĠ Ġval Ġresult Clean Build Ġ= Ġgradle Runner . with Arguments (" clean ", Ġ" build "). build () ĊĊĠĠĠĠĠĠĠ ĠAssert . assertEquals ( Task Outcome . SUCCESS , Ġresult Clean Build . task (": workload : build ") ?. outcome ) ĊĊĠĠĠĠĠĠĠ Ġval Ġartifact Ġ= ĠFile ( project . root , Ġ" workload / build / libs / workload - 1 . 0 - SNAPSHOT . jar ") ĊĠĠĠĠĠĠĠ ĠAssert . assertTrue ( artifact . exists ()) ĊĊĠĠĠĠĠĠĠ ĠJar File ( artifact ). use Ġ{ Ġjar File Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAssert . assertTrue ( jar File . getEntry (" Test Processor . log "). size Ġ> Ġ 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAssert . assertTrue ( jar File . getEntry (" hello / HEL LO . class "). size Ġ> Ġ 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAssert . assertTrue ( jar File . getEntry (" com / example / AC lass Builder . class "). size Ġ> Ġ 0 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ