File tree Expand file tree Collapse file tree
apexchainx_calculator/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -604,6 +604,26 @@ fn test_exact_threshold_mttr_is_always_met_never_violated() {
604604 }
605605}
606606
607+ #[ test]
608+ fn test_threshold_boundary_keeps_equality_met_and_plus_one_violated ( ) {
609+ let ( _env, client, _actors) = setup ( ) ;
610+
611+ let exact =
612+ client. calculate_sla_view ( & symbol_short ! ( "BND_EX" ) , & symbol_short ! ( "critical" ) , & 15 ) ;
613+ let plus_one =
614+ client. calculate_sla_view ( & symbol_short ! ( "BND_P1" ) , & symbol_short ! ( "critical" ) , & 16 ) ;
615+
616+ assert_eq ! ( exact. status, symbol_short!( "met" ) ) ;
617+ assert_eq ! ( exact. payment_type, symbol_short!( "rew" ) ) ;
618+ assert_eq ! ( exact. rating, symbol_short!( "good" ) ) ;
619+ assert ! ( exact. amount > 0 ) ;
620+
621+ assert_eq ! ( plus_one. status, symbol_short!( "viol" ) ) ;
622+ assert_eq ! ( plus_one. payment_type, symbol_short!( "pen" ) ) ;
623+ assert_eq ! ( plus_one. rating, symbol_short!( "poor" ) ) ;
624+ assert ! ( plus_one. amount < 0 ) ;
625+ }
626+
607627#[ test]
608628fn test_exact_threshold_boundary_is_stable_after_config_update ( ) {
609629 let ( _env, client, actors) = setup ( ) ;
You can’t perform that action at this time.
0 commit comments