e47e6cfbdc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
19 lines
691 B
Go
19 lines
691 B
Go
package lkgateway
|
|
|
|
import "testing"
|
|
|
|
func TestLKPaperTypeAndPairs(t *testing.T) {
|
|
for cfi, want := range map[string]string{"ESVXFR": "share", "EDSXFR": "depositary_receipt", "DBFXFR": "bond", "CEOGMR": "fund"} {
|
|
if got := lkPaperType(cfi, ""); got != want {
|
|
t.Fatalf("%s: %s", cfi, got)
|
|
}
|
|
}
|
|
if lkPaperType("", "ОФЗ 26238 ПД обл") != "bond" || lkPaperType("", "БПИФ «Ликвидность» фонд") != "fund" {
|
|
t.Fatal("по названию")
|
|
}
|
|
p := LKPortfolioSyncSettings{Pairs: "ДД-816=БР-859; мусор ;ДД-1 = БР-1"}.pairs()
|
|
if len(p) != 2 || p[0].LK != "ДД-816" || p[0].Depo != "БР-859" || p[1].Depo != "БР-1" {
|
|
t.Fatalf("%+v", p)
|
|
}
|
|
}
|