T-103: assert each post-cutoff mutation independently in cutoff test
This commit is contained in:
parent
1a621f0ed9
commit
cbf25f90b7
1 changed files with 23 additions and 0 deletions
|
|
@ -1431,6 +1431,29 @@ fn point_in_time_post_cutoff_mutations_leave_on_or_before_cutoff_rows_bitwise_id
|
|||
assert_eq!(base_gt.len(), 3);
|
||||
assert_eq!(mut_gt.len(), 3);
|
||||
assert_ne!(base_gt, mut_gt, "post-cutoff rows must reflect post-cutoff mutations");
|
||||
|
||||
// Verify each of the three post-cutoff mutations independently by effective date and kind.
|
||||
let mut_split = mut_gt
|
||||
.iter()
|
||||
.find(|r| r.ex_date == d_post_1 && r.kind == CorporateActionKind::Split)
|
||||
.expect("mutated post-cutoff split row");
|
||||
assert_eq!(mut_split.listing_id, 111);
|
||||
assert_eq!(mut_split.ratio, Some(5.0));
|
||||
|
||||
let mut_div = mut_gt
|
||||
.iter()
|
||||
.find(|r| r.ex_date == d_post_2 && r.kind == CorporateActionKind::Dividend)
|
||||
.expect("mutated post-cutoff dividend row");
|
||||
assert_eq!(mut_div.listing_id, 111);
|
||||
assert_eq!(mut_div.cash_amount, Some(1.25));
|
||||
assert_eq!(mut_div.currency.as_deref(), Some("CAD"));
|
||||
|
||||
let mut_delist = mut_gt
|
||||
.iter()
|
||||
.find(|r| r.ex_date == d_post_2 && r.kind == CorporateActionKind::Delisting)
|
||||
.expect("mutated post-cutoff delisting row");
|
||||
assert_eq!(mut_delist.listing_id, 330);
|
||||
assert_eq!(mut_delist.terminal_return, Some(-1.00));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue