ЛК ЕСИА Финанс: портфель ДЕПО из DEPO — сверка каждые 10 с в проходе опроса, отправка только при изменении; настройки и «Синхронизировать сейчас»

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
zuevav
2026-09-29 16:54:43 +03:00
parent 98e17a8cb7
commit e47e6cfbdc
10 changed files with 500 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
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)
}
}