package Ġcom . sh agal al ab . q are jet . domain . inter actor . transaction Ċ Ċ import Ġcom . n ha ar man . mockito _ kotlin . mock Ċ import Ġcom . n ha ar man . mockito _ kotlin . times Ċ import Ġcom . n ha ar man . mockito _ kotlin . verify Ċ import Ġcom . n ha ar man . mockito _ kotlin . verify No More Interactions Ċ import Ġcom . sh agal al ab . q are jet . domain . model . Account Ċ import Ġcom . sh agal al ab . q are jet . domain . model . Category Ċ import Ġcom . sh agal al ab . q are jet . domain . model . Transaction Ċ import Ġcom . sh agal al ab . q are jet . domain . repository . Transaction Repository Ċ import Ġorg . junit . Test Ċ import Ġjava . util . Date Ċ Ċ class ĠTransactions Use Cases Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġtransaction Ġ= ĠTransaction ( 1 , Ġ 1 , ĠDate (), ĠAccount ( 1 , Ġ" one ", Ġ" one "), ĠCategory ( 1 , Ġ"", Ġ" icon ", Ġ" color ", Ġ 1 ), Ġ 1 . 2 , Ġ"") ĊĠĠĠ Ġprivate Ġval Ġtransaction Id Ġ= Ġ 1 L ĊĠĠĠ Ġprivate Ġval Ġrepository Mock Ġ= Ġmock < Transaction Repository >() ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould AddNew Transaction () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġuse Case Ġ= ĠAdd Transaction UseCase ( repository Mock ) ĊĠĠĠĠĠĠĠ Ġuse Case . execute ( transaction ) ĊĠĠĠĠĠĠĠ Ġverify ( repository Mock , Ġtimes ( 1 )). add Transaction ( transaction ) ĊĠĠĠĠĠĠĠ Ġverify No More Interactions ( repository Mock ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould GetAll Transactions () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġuse Case Ġ= ĠGet Transactions UseCase ( repository Mock ) ĊĠĠĠĠĠĠĠ Ġuse Case . execute () ĊĠĠĠĠĠĠĠ Ġverify ( repository Mock , Ġtimes ( 1 )). getAll Transactions () ĊĠĠĠĠĠĠĠ Ġverify No More Interactions ( repository Mock ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Get Transaction () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġuse Case Ġ= ĠGet Transaction UseCase ( repository Mock ) ĊĠĠĠĠĠĠĠ Ġuse Case . execute ( transaction Id ) ĊĠĠĠĠĠĠĠ Ġverify ( repository Mock , Ġtimes ( 1 )). getTransaction ( transaction Id ) ĊĠĠĠĠĠĠĠ Ġverify No More Interactions ( repository Mock ) ĊĠĠĠ Ġ} Ċ }