package Ġcom . sw iss chain . matching . engine . services . validator . settings Ċ Ċ import Ġcom . sw iss chain . matching . engine . Abstract Test . Companion . DEFAULT _ BRO KER Ċ import Ġcom . sw iss chain . matching . engine . config . Test ApplicationContext Ċ import Ġcom . sw iss chain . matching . engine . database . Test Di ctionaries Database Accessor Ċ import Ġcom . sw iss chain . matching . engine . services . validators . impl . ValidationException Ċ import Ġcom . sw iss chain . matching . engine . services . validators . settings . impl . Disabled Function ality Setting Validator Ċ import Ġcom . sw iss chain . matching . engine . utils . Di ctionaries Init Ċ import Ġcom . sw iss chain . matching . engine . web . dto . Disabled Function ality Rule Dto Ċ import Ġcom . sw iss chain . matching . engine . web . dto . Operation Type Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . boot . test . context . SpringBootTest Ċ import Ġorg . springframework . boot . test . context . Test Configuration Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Primary Ċ import Ġorg . springframework . test . annotation . Dir ties Context Ċ import Ġorg . springframework . test . context . junit 4 . Spring Runner Ċ Ċ @ RunWith ( Spring Runner :: class ) Ċ @ SpringBootTest ( classes Ġ= Ġ[( Test ApplicationContext :: class ), Ġ( Disabled Function ality Setting Validator Test . Config :: class )]) Ċ @ Dir ties Context ( class Mode Ġ= ĠD irt ies Context . Class Mode . AFTER _ EACH _ TEST _ METHOD ) Ċ class ĠDisabled Function ality Setting Validator Test Ġ{ ĊĊĠĠĠ Ġ@ Test Configuration ĊĠĠĠ Ġopen Ġclass ĠConfig Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Bean ĊĠĠĠĠĠĠĠ Ġ@ Primary ĊĠĠĠĠĠĠĠ Ġfun Ġtest Di ctionaries Database Accessor (): ĠTest Di ctionaries Database Accessor Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtest Di ctionaries Database Accessor Ġ= ĠTest Di ctionaries Database Accessor () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest Di ctionaries Database Accessor . add Asset Pair ( Di ctionaries Init . create Asset Pair (" BTC USD ", Ġ" BTC ", Ġ" USD ", Ġ 5 )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest Di ctionaries Database Accessor . add Asset ( Di ctionaries Init . create Asset (" BTC ", Ġ 8 )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtest Di ctionaries Database Accessor . add Asset ( Di ctionaries Init . create Asset (" USD ", Ġ 4 )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġtest Di ctionaries Database Accessor ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġdisabled Function ality Setting Validator : ĠDisabled Function ality Setting Validator ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠValidation Exception :: class ) ĊĠĠĠ Ġfun Ġtest Empty Rule Is Invalid () Ġ{ ĊĠĠĠĠĠĠĠ Ġdisabled Function ality Setting Validator . validate ( Disabled Function ality Rule Dto ( null , ĠDEFAULT _ BRO KER , Ġnull , Ġ"", Ġnull , Ġtrue , Ġ" test ", Ġ" test ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠValidation Exception :: class ) ĊĠĠĠ Ġfun Ġtest Asset DoesNotExist () Ġ{ ĊĠĠĠĠĠĠĠ Ġdisabled Function ality Setting Validator . validate ( Disabled Function ality Rule Dto ( null , ĠDEFAULT _ BRO KER , Ġ" TEST ", Ġ"", ĠOperation Type . C ASH _ IN . name , Ġtrue , Ġ" test ", Ġ" test ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠValidation Exception :: class ) ĊĠĠĠ Ġfun Ġtest Asset Pair DoesNotExist () Ġ{ ĊĠĠĠĠĠĠĠ Ġdisabled Function ality Setting Validator . validate ( Disabled Function ality Rule Dto ( null , ĠDEFAULT _ BRO KER , Ġ" TEST ", Ġ"", ĠOperation Type . C ASH _ OUT . name , Ġtrue , Ġ" test ", Ġ" test ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠValidation Exception :: class ) ĊĠĠĠ Ġfun Ġoperation DoesNotExist () Ġ{ ĊĠĠĠĠĠĠĠ Ġdisabled Function ality Setting Validator . validate ( Disabled Function ality Rule Dto ( null , ĠDEFAULT _ BRO KER , Ġ" TEST ", Ġ"", Ġ" NOT _ EXIST ", Ġtrue , Ġ" test ", Ġ" test ")) ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠValidation Exception :: class ) ĊĠĠĠ Ġfun Ġnon Tr ad Operation Supp lied With Asset Pair () Ġ{ ĊĠĠĠĠĠĠĠ Ġdisabled Function ality Setting Validator . validate ( Disabled Function ality Rule Dto ( null , ĠDEFAULT _ BRO KER , Ġnull , Ġ" BTC USD ", ĠOperation Type . C ASH _ OUT . name , Ġtrue , Ġ" test ", Ġ" test ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġvalid Rule () Ġ{ ĊĠĠĠĠĠĠĠ Ġdisabled Function ality Setting Validator . validate ( Disabled Function ality Rule Dto ( null , ĠDEFAULT _ BRO KER , Ġ" BTC ", Ġ" BTC USD ", ĠOperation Type . TRA DE . name , Ġtrue , Ġ" test ", Ġ" test ")) ĊĠĠĠ Ġ} Ċ }