Example #1
0
func TestFetchingKnownPacketTypes(t *testing.T) {
	i := amf0.NewIdentifier(BoolFactory)

	v := i.TypeOf(0x01)

	assert.IsType(t, new(amf0.Bool), v)
}
Example #2
0
func TestFetchingUnknownPacketTypes(t *testing.T) {
	i := amf0.NewIdentifier()

	typ := i.TypeOf(0x01)

	assert.Nil(t, typ)
}
Example #3
0
func TestIdentifierConstruction(t *testing.T) {
	i := amf0.NewIdentifier()

	assert.IsType(t, &amf0.Identifier{}, i)
}