]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/file_path_test.go
Implement Scanner and Writer interface for FilePath
[rbdr/mobius] / hotline / file_path_test.go
index f25941ebc55bc27ccd7a0e4eb01185a8b0a5deff..c2fa66687b02366320007df690db485b1fdfe038 100644 (file)
@@ -5,7 +5,7 @@ import (
        "testing"
 )
 
-func TestFilePath_UnmarshalBinary(t *testing.T) {
+func TestFilePath_Write(t *testing.T) {
        type args struct {
                b []byte
        }
@@ -56,8 +56,8 @@ func TestFilePath_UnmarshalBinary(t *testing.T) {
        for _, tt := range tests {
                t.Run(tt.name, func(t *testing.T) {
                        var fp FilePath
-                       if err := fp.UnmarshalBinary(tt.args.b); (err != nil) != tt.wantErr {
-                               t.Errorf("UnmarshalBinary() error = %v, wantErr %v", err, tt.wantErr)
+                       if _, err := fp.Write(tt.args.b); (err != nil) != tt.wantErr {
+                               t.Errorf("Write() error = %v, wantErr %v", err, tt.wantErr)
                        }
                        if !assert.Equal(t, tt.want, fp) {
                                t.Errorf("Read() got = %v, want %v", fp, tt.want)