fix trading212 record test
All checks were successful
Generate check / check-changes (pull_request) Successful in 4s
Quality / check-changes (pull_request) Successful in 3s
Generate check / verify-generate (pull_request) Successful in 11s
Quality / run-tests (pull_request) Successful in 13s

This commit is contained in:
2026-05-17 09:45:53 +01:00
parent a4237aa00c
commit 22a0204fa2

View File

@@ -158,7 +158,7 @@ func TestRecordReader_ReadRecord_Split(t *testing.T) {
// open row has the NEW (post-split) position: more shares at lower price // open row has the NEW (post-split) position: more shares at lower price
// close row has the OLD (pre-split) position: fewer shares at higher price // close row has the OLD (pre-split) position: fewer shares at higher price
// ratio = openQty / closeQty = 0.5 / 0.1 = 5 (a 5:1 split) // ratio = openQty / closeQty = 0.5 / 0.1 = 5 (a 5:1 split)
splitOpen := `Stock split open,2025-06-03 05:34:16,XX1234567890,ABXY,"Aspargus Broccoli",EOF111111111,0.5000000000,20.0000000000,EUR,1.00000000,,,10.00,"EUR",,,,,,` splitOpen := `Stock split open,2025-06-03 05:34:16,XX1234567890,ABXY,"Aspargus Broccoli",EOF111111111,0.5000000000,20.0000000000,EUR,1.00000000,,,10.00,"EUR",,,,,,`
splitClose := `Stock split close,2025-06-03 05:34:16,XX1234567890,ABXY,"Aspargus Broccoli",EOF222222222,0.1000000000,100.0000000000,EUR,1.00000000,0.00,"EUR",10.00,"EUR",,,,,,` splitClose := `Stock split close,2025-06-03 05:34:16,XX1234567890,ABXY,"Aspargus Broccoli",EOF222222222,0.1000000000,100.0000000000,EUR,1.00000000,0.00,"EUR",10.00,"EUR",,,,,,`
t.Run("well-formed split pair returns split record with correct ratio", func(t *testing.T) { t.Run("well-formed split pair returns split record with correct ratio", func(t *testing.T) {
@@ -175,7 +175,7 @@ func TestRecordReader_ReadRecord_Split(t *testing.T) {
if got.Kind() != internal.KindSplit { if got.Kind() != internal.KindSplit {
t.Errorf("want kind %v but got %v", internal.KindSplit, got.Kind()) t.Errorf("want kind %v but got %v", internal.KindSplit, got.Kind())
} }
if got.Symbol() != "NO0013536151" { if got.Symbol() != "XX1234567890" {
t.Errorf("want symbol NO0013536151 but got %v", got.Symbol()) t.Errorf("want symbol NO0013536151 but got %v", got.Symbol())
} }