Examples of MinutesChannel


Examples of gaej2011.model.MinutesChannel

        }
        String clientId = UUID.randomUUID().toString();
        ChannelService channelService =
            ChannelServiceFactory.getChannelService();
        String token = channelService.createChannel(clientId);
        MinutesChannel minutesChannel = new MinutesChannel();
        minutesChannel.setKey(Datastore.createKey(
            MinutesChannel.class,
            clientId));
        minutesChannel.setCreatedAt(new Date());
        minutesChannel.setMinutesKey(minutesKey);
        minutesChannel.setToken(token);
        Datastore.putAsync(minutesChannel);
        response.setCharacterEncoding("utf-8");
        response.setContentType("application/json");
        response.getWriter().println(
            MinutesChannelMeta.get().modelToJson(minutesChannel));
View Full Code Here

Examples of gaej2011.model.MinutesChannel

            instanceOf(ChannelController.class));
        assertThat(
            " レスポンスコードが200",
            tester.response.getStatus(),
            is(HttpServletResponse.SC_OK));
        MinutesChannel minutesChannel =
            MinutesChannelMeta.get().jsonToModel(
                tester.response.getOutputAsString());
        assertThat(
            "channel のtoken が返される",
            minutesChannel.getToken(),
            is(notNullValue()));
    }
View Full Code Here

Examples of gaej2011.model.MinutesChannel

    @Test
    public void 接続済みのチャンネルにプッシュできる() {
        // テスト用の議事録
        Key testMinutesKey = MinutesService.put(" テスト用議事録1");
        // テスト用の接続済みチャンネル1
        MinutesChannel minutesChannel1 = new MinutesChannel();
        minutesChannel1.setMinutesKey(testMinutesKey);
        minutesChannel1.setToken("test-token1");
        minutesChannel1.setKey(Datastore.createKey(
            MinutesChannel.class,
            "test-client-id1"));
        Datastore.put(minutesChannel1);
        // テスト用の接続済みチャンネル2
        MinutesChannel minutesChannel2 = new MinutesChannel();
        minutesChannel2.setMinutesKey(testMinutesKey);
        minutesChannel2.setToken("test-token2");
        minutesChannel2.setKey(Datastore.createKey(
            MinutesChannel.class,
            "test-client-id2"));
        Datastore.put(minutesChannel2);
        // 新たに投稿されてプッシュされるべき投稿
        Key memoKey = MemoService.put(testMinutesKey, "test 投稿");
View Full Code Here

Examples of gaej2011.model.MinutesChannel

    @Test
    public void 接続済みのチャンネルにプッシュできる_関係ないチャンネルにはプッシュされない() {
        // テスト用の議事録
        Key testMinutesKey = MinutesService.put(" テスト用議事録1");
        // テスト用の接続済みチャンネル1
        MinutesChannel minutesChannel1 = new MinutesChannel();
        minutesChannel1.setMinutesKey(testMinutesKey);
        minutesChannel1.setToken("test-token1");
        minutesChannel1.setKey(Datastore.createKey(
            MinutesChannel.class,
            "test-client-id1"));
        Datastore.put(minutesChannel1);
        // 新たに投稿されてプッシュされるべき投稿
        Key memoKey = MemoService.put(testMinutesKey, "test 投稿");
        // テスト用の議事録2(プッシュとは関係ない議事録)
        Key testMinutesKey2 = MinutesService.put(" テスト用議事録2");
        // テスト用の接続済みチャンネル2(プッシュとは関係ないチャンネル)
        MinutesChannel minutesChannel2 = new MinutesChannel();
        minutesChannel2.setMinutesKey(testMinutesKey2);
        minutesChannel2.setToken("test-token2");
        minutesChannel2.setKey(Datastore.createKey(
            MinutesChannel.class,
            "test-client-id2"));
        Datastore.put(minutesChannel2);
        ChannelDelegate channelDelegate = new ChannelDelegate();
        ApiProxy.setDelegate(channelDelegate);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.