package Ġcom . k re ait . bots . agile . domain . slack . stand up . trigger Ċ Ċ import Ġcom . k re ait . bots . agile . IntegrationTest Ċ import Ġcom . k re ait . bots . agile . Test Application Ċ import Ġcom . k re ait . bots . agile . core . stand up . data . repository . sample Ċ import Ġcom . k re ait . bots . agile . domain . common . data . Stand up Ċ import Ġcom . k re ait . bots . agile . domain . common . data . Stand up Repository Ċ import Ġcom . k re ait . slack . api . contract . jackson . Slack Command Ċ import Ġcom . k re ait . slack . api . contract . jackson . group . chat . Post Ep hemeral Request Ċ import Ġcom . k re ait . slack . api . contract . jackson . group . chat . Successful Post Ep hemeral Response Ċ import Ġcom . k re ait . slack . api . contract . jackson . group . chat . sample Ċ import Ġcom . k re ait . slack . api . contract . jackson . group . dialog .* Ċ import Ġcom . k re ait . slack . api . contract . jackson . sample Ċ import Ġcom . k re ait . slack . api . test . Mock Slack Client Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . mock Ċ import Ġorg . junit . jupiter . api . Assertions Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . DisplayName Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . extension . Extend With Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . boot . test . context . SpringBootTest Ċ import Ġorg . springframework . test . context . junit . jupiter . Spring Extension Ċ import Ġjava . time . LocalDate Ċ Ċ @ IntegrationTest Ċ @ SpringBootTest ( classes Ġ= Ġ[ Test Application :: class ]) Ċ class ĠTrigger Stand up Dialog Test Ġ@ Autowired Ġconstructor ( private Ġval Ġstand up Repository : ĠStand up Repository ) Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġslack Client : ĠMock Slack Client ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġcommand : ĠSlack Command ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġtrigger Stand up Dialog : ĠTrigger Stand up Dialog ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĊĠĠĠĠĠĠĠ Ġslack Client Ġ= ĠMock Slack Client () ĊĠĠĠĠĠĠĠ Ġstand up Repository . delete All () ĊĠĠĠĠĠĠĠ Ġcommand Ġ= ĠSlack Command . sample (). copy ( userId Ġ= Ġ" sample User ", Ġteam Id Ġ= Ġ" sample Team ", Ġchannel Id Ġ= Ġ" sample Channel ") ĊĊĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġ@ DisplayName (" Test ĠTrigger ĠStand up Ġwith Ġopen Ġstand ups ") ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Trigger Open Stand ups () Ġ{ ĊĠĠĠĠĠĠĠ Ġslack Client . chat (). post Ep hemeral (" "). success Response Ġ= ĠSuccessful Post Ep hemeral Response . sample () ĊĠĠĠĠĠĠĠ Ġstand up Repository . insert ( Stand up . sample (). copy ( userId Ġ= Ġcommand . userId , Ġteam Id Ġ= Ġcommand . team Id , Ġstatus Ġ= ĠStand up . Status . OPEN , Ġdate Ġ= ĠLocalDate . now ())) ĊĊĠĠĠĠĠĠĠ Ġtrigger Stand up Dialog Ġ= ĠTrigger Stand up Dialog ( slack Client , Ġstand up Repository , Ġmock ()) ĊĠĠĠĠĠĠĠ Ġtrigger Stand up Dialog . open Dialog ( command , Ġ"") ĊĠĠĠĠĠĠĠ Ġval Ġexpected Param Ġ= ĠPost Ep hemeral Request ( text Ġ= Ġ" Sorry , ĠI Ġcan 't Ġstart Ġthis Ġstand up Ġfor Ġyou , Ġyet . ĠYou Ġstill Ġhave Ġan Ġactive Ġstand up Ġgoing Ġon .", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġchannel Ġ= Ġ" sample Channel ", Ġuser Ġ= Ġ" sample User ") ĊĠĠĠĠĠĠĠ ĠAssertions . assertEquals ( slack Client . chat (). post Ep hemeral (" "). params (), Ġexpected Param ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ DisplayName (" Test ĠTrigger ĠStand up Ġwithout Ġstand ups ") ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Trigger () Ġ{ ĊĠĠĠĠĠĠĠ Ġslack Client . dialog (). open (" "). success Response Ġ= ĠSuccessful Open Dialog Response . sample () ĊĊĠĠĠĠĠĠĠ Ġstand up Repository . insert ( Stand up . sample (). copy ( userId Ġ= Ġcommand . userId , Ġteam Id Ġ= Ġcommand . team Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstatus Ġ= ĠStand up . Status . CREATED , Ġdate Ġ= ĠLocalDate . now (), Ġname Ġ= Ġ" sample Stand up ", Ġstand up Definition Id Ġ= Ġ" sample SD ")) ĊĠĠĠĠĠĠĠ Ġtrigger Stand up Dialog Ġ= ĠTrigger Stand up Dialog ( slack Client , Ġstand up Repository , Ġmock ()) ĊĠĠĠĠĠĠĠ Ġtrigger Stand up Dialog . open Dialog ( command , Ġ"") ĊĊĠĠĠĠĠĠĠ Ġval Ġexpected Param Ġ= ĠOpen Dialog Request ( trigger _ id Ġ= Ġcommand . trigger Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdialog Ġ= ĠDialog ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcallback _ id Ġ= ĠTrigger Stand up Dialog . CALLBACK _ ID , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Ġ= Ġ" Trigger Ġa ĠStand - up ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġelements Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠSelect Element ( label Ġ= Ġ" Select Ġthe Ġstand - up ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= ĠTrigger Stand up Dialog . STAND UP _ SELECTION , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoptions Ġ= ĠlistOf ( Options (" sample Stand up ", Ġ" sample SD ")), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtype Ġ= ĠType . SELECT ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ))) ĊĠĠĠĠĠĠĠ ĠAssertions . assertEquals ( slack Client . dialog (). open (" "). params (), Ġexpected Param ) ĊĠĠĠ Ġ} Ċ } Ċ