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

	v := i.TypeOf(0x01)

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

	typ := i.TypeOf(0x01)

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

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