@@ -260,7 +260,7 @@ impl Obligation {
260
260
. unwrap_or ( ObligationStatus :: NotYetDue )
261
261
}
262
262
263
- pub fn check_status_transitioned ( & self , now : DateTime < Utc > ) -> bool {
263
+ pub fn is_status_up_to_date ( & self , now : DateTime < Utc > ) -> bool {
264
264
self . status ( ) == self . expected_status ( now)
265
265
}
266
266
@@ -762,7 +762,7 @@ mod test {
762
762
assert_eq ! ( obligation. status( ) , ObligationStatus :: Paid ) ;
763
763
}
764
764
765
- mod status_transitioned {
765
+ mod is_status_up_to_date {
766
766
767
767
use super :: * ;
768
768
@@ -813,7 +813,7 @@ mod test {
813
813
let obligation = obligation_from ( initial_events ( now) ) ;
814
814
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: NotYetDue ) ;
815
815
assert_eq ! ( obligation. status( ) , ObligationStatus :: NotYetDue ) ;
816
- assert ! ( obligation. check_status_transitioned ( now) ) ;
816
+ assert ! ( obligation. is_status_up_to_date ( now) ) ;
817
817
}
818
818
819
819
#[ test]
@@ -824,7 +824,7 @@ mod test {
824
824
let now = due_timestamp ( Utc :: now ( ) ) ;
825
825
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: Due ) ;
826
826
assert_eq ! ( obligation. status( ) , ObligationStatus :: NotYetDue ) ;
827
- assert ! ( !obligation. check_status_transitioned ( now) ) ;
827
+ assert ! ( !obligation. is_status_up_to_date ( now) ) ;
828
828
}
829
829
830
830
#[ test]
@@ -841,7 +841,7 @@ mod test {
841
841
let now = due_timestamp ( Utc :: now ( ) ) ;
842
842
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: Due ) ;
843
843
assert_eq ! ( obligation. status( ) , ObligationStatus :: Due ) ;
844
- assert ! ( obligation. check_status_transitioned ( now) ) ;
844
+ assert ! ( obligation. is_status_up_to_date ( now) ) ;
845
845
}
846
846
847
847
#[ test]
@@ -858,7 +858,7 @@ mod test {
858
858
let now = overdue_timestamp ( Utc :: now ( ) ) ;
859
859
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: Overdue ) ;
860
860
assert_eq ! ( obligation. status( ) , ObligationStatus :: Due ) ;
861
- assert ! ( !obligation. check_status_transitioned ( now) ) ;
861
+ assert ! ( !obligation. is_status_up_to_date ( now) ) ;
862
862
}
863
863
864
864
#[ test]
@@ -882,7 +882,7 @@ mod test {
882
882
let now = overdue_timestamp ( Utc :: now ( ) ) ;
883
883
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: Overdue ) ;
884
884
assert_eq ! ( obligation. status( ) , ObligationStatus :: Overdue ) ;
885
- assert ! ( obligation. check_status_transitioned ( now) ) ;
885
+ assert ! ( obligation. is_status_up_to_date ( now) ) ;
886
886
}
887
887
888
888
#[ test]
@@ -911,7 +911,7 @@ mod test {
911
911
912
912
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: Paid ) ;
913
913
assert_eq ! ( obligation. status( ) , ObligationStatus :: Paid ) ;
914
- assert ! ( obligation. check_status_transitioned ( now) ) ;
914
+ assert ! ( obligation. is_status_up_to_date ( now) ) ;
915
915
}
916
916
917
917
#[ test]
@@ -935,7 +935,7 @@ mod test {
935
935
let now = defaulted_timestamp ( Utc :: now ( ) ) ;
936
936
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: Defaulted ) ;
937
937
assert_eq ! ( obligation. status( ) , ObligationStatus :: Overdue ) ;
938
- assert ! ( !obligation. check_status_transitioned ( now) ) ;
938
+ assert ! ( !obligation. is_status_up_to_date ( now) ) ;
939
939
}
940
940
941
941
#[ test]
@@ -964,7 +964,7 @@ mod test {
964
964
let now = defaulted_timestamp ( Utc :: now ( ) ) ;
965
965
assert_eq ! ( obligation. expected_status( now) , ObligationStatus :: Defaulted ) ;
966
966
assert_eq ! ( obligation. status( ) , ObligationStatus :: Defaulted ) ;
967
- assert ! ( obligation. check_status_transitioned ( now) ) ;
967
+ assert ! ( obligation. is_status_up_to_date ( now) ) ;
968
968
}
969
969
}
970
970
}
0 commit comments