Package gaej2011.meta

Examples of gaej2011.meta.KeyWordMeta


            is("text/html"));
        assertThat(
            "Chancter-Encoding はutf-8",
            tester.response.getCharacterEncoding(),
            is("utf-8"));
        Profile profile =
            ProfileMeta.get().jsonToModel(tester.response.getOutputAsString());
        assertThat(
            "JSON にimageUrl のエントリが含まれる",
            profile.getProfileURL(),
            is(notNullValue()));
        int afterCount = tester.count(Profile.class);
        assertThat("Profile が一件増える", afterCount, is(beforeCount + 1));
    }
View Full Code Here


    @Test
    public void ユーザのプロフィール画像の取得() throws NullPointerException,
            IllegalArgumentException, IOException, ServletException {
        // ユーザに対応するProfile を準備する。
        Profile profile = new Profile();
        profile.setKey(Datastore.createKey(Profile.class, "1"));
        profile.setProfileURL("dummy_url");
        Datastore.put(profile);
        tester.param("user", "1");
        tester.start(PATH);
        assertThat(
            "ImagesController のインスタンスが使用される",
View Full Code Here

        }
    }

    private Navigation redirectToProfileImage() {
        Key profileKey = Datastore.createKey(Profile.class, asString("user"));
        Profile profile = Datastore.getOrNull(Profile.class, profileKey);
        if (profile == null) {
            response.setStatus(HttpServletResponse.SC_NOT_FOUND);
            return null;
        }
        return redirect(profile.getProfileURL());
    }
View Full Code Here

        String servingUrl =
            ImagesServiceFactory.getImagesService().getServingUrl(
                blobKey,
                32,
                false);
        Profile profile = new Profile();
        profile.setKey(Datastore.createKey(
            Profile.class,
            String.valueOf(currentUser.getUserId())));
        profile.setProfileURL(servingUrl);
        Datastore.put(profile);
        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html");
        response.getWriter().println(ProfileMeta.get().modelToJson(profile));
        response.flushBuffer();
View Full Code Here

            is("application/json"));
        assertThat(
            "Chancter-Encoding はutf-8",
            tester.response.getCharacterEncoding(),
            is("utf-8"));
        UploadUrlDTO dto =
            UploadUrlDTOMeta.get().jsonToModel(
                tester.response.getOutputAsString());
        assertThat("uploadUrl が返される", dto.getUploadUrl(), is(notNullValue()));
    }
View Full Code Here

            return null;
        }
        String uploadUrl =
            BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(
                ImagesController.PATH);
        UploadUrlDTO dto = new UploadUrlDTO();
        dto.setUploadUrl(uploadUrl);
        response.setCharacterEncoding("utf-8");
        response.setContentType("application/json");
        response.getWriter().println(UploadUrlDTOMeta.get().modelToJson(dto));
        response.flushBuffer();
        return null;
View Full Code Here

TOP

Related Classes of gaej2011.meta.KeyWordMeta

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.