| 1 |
package segment |
| 2 |
|
| 3 |
import "testing" |
| 4 |
|
| 5 |
func TestSynchronisationResponseSegmentUnmarshalHBCI(t *testing.T) { |
| 6 |
test := "HISYN:169:3:5+4534131272717070+12+144115'" |
| 7 |
|
| 8 |
syncSegment := &SynchronisationResponseSegment{} |
| 9 |
|
| 10 |
err := syncSegment.UnmarshalHBCI([]byte(test)) |
| 11 |
|
| 12 |
if err != nil { |
| 13 |
t.Logf("Expected no error, got %T:%v\n", err, err) |
| 14 |
t.Fail() |
| 15 |
} |
| 16 |
|
| 17 |
expected := test |
| 18 |
actual := syncSegment.String() |
| 19 |
|
| 20 |
if expected != actual { |
| 21 |
t.Logf("Expected unmarshaled value to equal\n%q\n\tgot\n%q\n", expected, actual) |
| 22 |
t.Fail() |
| 23 |
} |
| 24 |
|
| 25 |
} |