Skip to content

Commit

Permalink
Serialize schemas feature hamba#400
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovic-pourrat authored May 17, 2024
1 parent dc715a4 commit a998b42
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ func TestParseFiles(t *testing.T) {
assert.Equal(t, avro.String, s.Type())
}

func TestSerialize(t *testing.T) {
s, err := avro.ParseFiles("testdata/superhero-part1.avsc", "testdata/superhero-part2.avsc")

data := avro.Serialize(s)
n, err := avro.Parse(data)
require.NoError(t, err)
assert.Equal(t, avro.Record, n.Type())
}

func TestParseFiles_FileDoesntExist(t *testing.T) {
_, err := avro.ParseFiles("test.something")

Expand Down

0 comments on commit a998b42

Please sign in to comment.