improved logging + autotests

This commit is contained in:
Stephan D
2025-12-26 12:26:28 +01:00
parent 5191336a49
commit 171d90b3f7
20 changed files with 1282 additions and 56 deletions

View File

@@ -0,0 +1,23 @@
package monetix
import "testing"
func TestMaskPAN(t *testing.T) {
cases := []struct {
input string
expected string
}{
{input: "1234", expected: "****"},
{input: "1234567890", expected: "12******90"},
{input: "1234567890123456", expected: "123456******3456"},
}
for _, tc := range cases {
t.Run(tc.input, func(t *testing.T) {
got := MaskPAN(tc.input)
if got != tc.expected {
t.Fatalf("expected %q, got %q", tc.expected, got)
}
})
}
}