Package org.jboss.aerogear.simplepush.server

Examples of org.jboss.aerogear.simplepush.server.SimplePushServer


    @Test
    public void notificationVersionEqualToCurrentVersion() throws Exception {
        final String uaid = UUIDUtil.newUAID();
        final String channelId = UUID.randomUUID().toString();
        final SimplePushServer simplePushServer = defaultPushServer();
        final EmbeddedChannel channel = createWebsocketChannel(simplePushServer);
        registerUserAgent(uaid, channel);
        final RegisterResponse registerResponse = doRegister(channelId, uaid, simplePushServer);
        final String endpointToken = extractEndpointToken(registerResponse.getPushEndpoint());
        doNotification(endpointToken, channelId, 1L, simplePushServer, channel);
View Full Code Here


    @Test
    public void notificationVersionLessThanCurrent() throws Exception {
        final String uaid = UUIDUtil.newUAID();
        final String channelId = UUID.randomUUID().toString();
        final SimplePushServer simplePushServer = defaultPushServer();
        final EmbeddedChannel channel = createWebsocketChannel(simplePushServer);
        registerUserAgent(uaid, channel);
        final RegisterResponse registerResponse = doRegister(channelId, uaid, simplePushServer);
        final String endpointToken = extractEndpointToken(registerResponse.getPushEndpoint());
        doNotification(endpointToken, channelId, 10L, simplePushServer, channel);
View Full Code Here

        channel.close();
    }

    @Test
    public void notificationWithNonExistingChannelId() throws Exception {
        final SimplePushServer simplePushServer = defaultPushServer();
        final EmbeddedChannel channel = createWebsocketChannel(simplePushServer);
        channel.writeInbound(notificationRequest("non-existing-channelId", 10L));
        final HttpResponse httpResponse = channel.readOutbound();
        assertThat(httpResponse.getStatus().code(), equalTo(200));
        channel.close();
View Full Code Here

    @Test
    public void notificationWithoutVersionBody() throws Exception {
        final String uaid = UUIDUtil.newUAID();
        final String channelId = UUID.randomUUID().toString();
        final SimplePushServer simplePushServer = defaultPushServer();
        final EmbeddedChannel channel = createWebsocketChannel(simplePushServer);
        registerUserAgent(uaid, channel);
        final RegisterResponse registerResponse = doRegister(channelId, uaid, simplePushServer);
        final String endpointToken = extractEndpointToken(registerResponse.getPushEndpoint());
        doNotificationWithoutVersion(endpointToken, channelId, simplePushServer, channel);
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.simplepush.server.SimplePushServer

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.