func TestParseReturnsNilWhenNoMatchingDataExists(t *testing.T) { p := data.NewParser() d := p.New(0x08) assert.Nil(t, d) }
func TestParseConstructsNewInstancesOfDatas(t *testing.T) { p := data.NewParser( func() data.Data { return &data.Audio{} }, ) d := p.New(0x08) assert.IsType(t, new(data.Audio), d) }
func TestNewParserConstructsNewParsers(t *testing.T) { p := data.NewParser() assert.IsType(t, new(data.SimpleParser), p) }