Ejemplo n.º 1
0
func TestFetchingKnownPacketTypes(t *testing.T) {
	i := amf0.NewIdentifier(BoolFactory)

	v := i.TypeOf(0x01)

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

	typ := i.TypeOf(0x01)

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

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