Package org.jboss.aerogear.simplepush.protocol

Examples of org.jboss.aerogear.simplepush.protocol.PingMessage


        new PingMessageImpl("");
    }

    @Test
    public void constructWithBody() {
        final PingMessage ping = new PingMessageImpl("{}");
        assertThat(ping.getMessageType(), is(equalTo(MessageType.Type.PING)));
        assertThat(ping.getPingMessage(), equalTo(PingMessage.PING_MESSAGE));
    }
View Full Code Here


    }

    @Test
    public void fromJson() {
        final String json = "{ }";
        final PingMessage ping = JsonUtil.fromJson(json, PingMessageImpl.class);
        assertThat(ping.getMessageType(), is(equalTo(MessageType.Type.PING)));
        assertThat(ping.getPingMessage(), equalTo(PingMessage.PING_MESSAGE));
    }
View Full Code Here

    }

    @Test
    public void toJson() {
        final String json = JsonUtil.toJson(new PingMessageImpl());
        final PingMessage ping = JsonUtil.fromJson(json, PingMessageImpl.class);
        assertThat(ping.getMessageType(), is(equalTo(MessageType.Type.PING)));
        assertThat(ping.getPingMessage(), equalTo(PingMessage.PING_MESSAGE));
    }
View Full Code Here

    public void websocketPing() {
        final EmbeddedChannel channel = createWebSocketChannel(factory);
        sendWebSocketHttpUpgradeRequest(sessionUrl, channel);
        sendWebSocketHelloFrame(UUIDUtil.newUAID(), channel);

        final PingMessage pingResponse = sendWebSocketPingFrame(channel);
        assertThat(pingResponse.getPingMessage(), equalTo(PingMessage.PING_MESSAGE));
        channel.close();
    }
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.simplepush.protocol.PingMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.