Search in sources :

Example 1 with PrimitiveDecoderMetadataSet

use of org.eclipse.jetty.websocket.jsr356.decoders.PrimitiveDecoderMetadataSet in project jetty.project by eclipse.

the class PrimitiveDecoderMetadataSetTest method assertDecoderType.

private void assertDecoderType(Class<? extends Decoder> expectedDecoder, MessageType expectedMsgType, Class<?> type) {
    PrimitiveDecoderMetadataSet primitives = new PrimitiveDecoderMetadataSet();
    DecoderMetadata metadata = primitives.getMetadataByType(type);
    String prefix = String.format("Metadata By Type [%s]", type.getName());
    Assert.assertThat(prefix, metadata, notNullValue());
    assertClassEquals(prefix + ".coderClass", metadata.getCoderClass(), expectedDecoder);
    Assert.assertThat(prefix + ".messageType", metadata.getMessageType(), is(expectedMsgType));
}
Also used : DecoderMetadata(org.eclipse.jetty.websocket.jsr356.metadata.DecoderMetadata)

Aggregations

DecoderMetadata (org.eclipse.jetty.websocket.jsr356.metadata.DecoderMetadata)1