package Ġcom . jay . mont ior . ci Ċ Ċ import Ġcom . jay . mont ior . ci . team city . Guest Ċ import Ġcom . jay . mont ior . ci . team city . Team City Ci Ċ import Ġorg . hamcrest . Matcher Assert . assertThat Ċ import Ġorg . hamcrest . Matchers .* Ċ import Ġorg . junit . Test Ċ Ċ abstract Ġclass ĠCi Test < T Ġ: ĠCi >() Ġ{ ĊĊĠĠĠ Ġprivate Ġval ĠKotlin Build Ġ= ĠBuild Type (" bt 3 9 0 ", Ġ" Maven ĠBuild ", Ġ" Kotlin ", Ġ" Kotlin ", Ġ" https :// team city . jetbrains . com / view Type . html ? build TypeId = bt 3 9 0 ") ĊĊĠĠĠ Ġabstract Ġval Ġci : ĠT ĊĊĠĠĠ Ġ@ Test Ġfun Ġcan Talk To Ci () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( ci . ping (), Ġcontains String (" Team City ĠREST ĠAPI ")); ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġcan Get Build Types () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( ci . build Types . values , Ġhas Item ( Kotlin Build )); ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġcan Get Build Statuses () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġstatus Ġ= Ġci . status ( Kotlin Build ) ĊĠĠĠĠĠĠĠ ĠassertThat ( status , ĠequalTo ( ĠBuild Type Status ( Kotlin Build , ĠBuild (" 6 3 3 3 9 3 ", ĠKotlin Build , ĠStatus . success , Ġnull , Ġ 0 , ĠState . finished , Ġ" https :// team city . jetbrains . com / view Log . html ? build Id = 6 3 3 3 9 3 & build TypeId = bt 3 9 0 "), Ġnull , ĠlistOf ()))); ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġcan Get Build s Since () Ġ{ Ċ // ĠĠĠĠĠĠĠ Ġval Ġstatus Ġ= Ġci . status ( Z onedDateTime . now (). minus Minutes ( 1 )) Ċ // ĠĠĠĠĠĠĠ ĠassertThat ( status . size , Ġgreater Than (- 1 )); ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠTeam City Ci Test () Ġ: ĠCi Test < Team City Ci >() Ġ{ ĊĠĠĠ Ġoverride Ġval Ġci Ġ= ĠTeam City Ci (" https :// team city . jetbrains . com ", ĠGuest ) Ċ } ĊĊ