Package org.zanata.rest

Examples of org.zanata.rest.StringSet


    @Test(dataProvider = "TranslationTestData")
    public void testPutGetNoExtensionTranslation(String desc,
            TranslationsResource sr) {
        sr = cloneDTO(sr);
        Resource res = resourceTestFactory.getTextFlowTest();
        sourceDocResource.putResource(res.getName(), res, new StringSet(
                "gettext;comment"));
        log.debug("successful put resource:" + res.getName());
        translationResource.putTranslations(res.getName(), DE, sr,
                new StringSet("gettext;comment"));
        TranslationsResource get =
                translationResource.getTranslations(res.getName(), DE, null)
                        .getEntity();
        TranslationsResource base = transTestFactory.getTestObject();
        ResourceTestUtil.clearRevs(base);
View Full Code Here


    }

    @Test(dataProvider = "ResourceTestData")
    public void testPutGetResourceWithExtension(Resource sr) {
        log.debug("put resource:" + sr.toString());
        sourceDocResource.putResource(sr.getName(), sr, new StringSet(
                "gettext;comment"));
        Resource get =
                sourceDocResource.getResource(sr.getName(),
                        new StringSet("gettext;comment")).getEntity();
        ResourceTestUtil.clearRevs(sr);
        ResourceTestUtil.clearRevs(get);
        assertThat(get.toString(), is(sr.toString()));
    }
View Full Code Here

    public void testPutGetNoExtensionResource(Resource sr) {
        log.debug("put resource:" + sr.toString());
        sourceDocResource.putResource(sr.getName(), sr, null);
        Resource get =
                sourceDocResource.getResource(sr.getName(),
                        new StringSet("gettext;comment")).getEntity();
        Resource base = resourceTestFactory.getTextFlowTest();
        ResourceTestUtil.clearRevs(base);
        ResourceTestUtil.clearRevs(get);
        log.debug("expect:" + base.toString());
        log.debug("actual:" + get.toString());
View Full Code Here

    }

    @Test(dataProvider = "ResourceTestData")
    public void testPutNoExtensionGetResource(Resource sr) {
        log.debug("put resource:" + sr.toString());
        sourceDocResource.putResource(sr.getName(), sr, new StringSet(
                "gettext;comment"));
        Resource get =
                sourceDocResource.getResource(sr.getName(), null).getEntity();
        Resource base = resourceTestFactory.getTextFlowTest();
        ResourceTestUtil.clearRevs(base);
View Full Code Here

        assertThat(get.toString(), is(base.toString()));
    }

    @Test(dataProvider = "ResourceTestData")
    public void testPostGetResourceWithExtension(Resource sr) {
        sourceDocResource.post(sr, new StringSet("gettext;comment"), true);
        Resource get =
                sourceDocResource.getResource(sr.getName(),
                        new StringSet("gettext;comment")).getEntity();
        ResourceTestUtil.clearRevs(sr);
        ResourceTestUtil.clearRevs(get);
        log.debug("expect:" + sr.toString());
        log.debug("actual:" + get.toString());
        assertThat(get.toString(), is(sr.toString()));
View Full Code Here

    public void testPostNoExtensionGetResource(Resource sr) {
        log.debug("post resource:" + sr.toString());
        sourceDocResource.post(sr, null, true);
        Resource get =
                sourceDocResource.getResource(sr.getName(),
                        new StringSet("gettext;comment")).getEntity();
        Resource base = resourceTestFactory.getTextFlowTest();
        ResourceTestUtil.clearRevs(base);
        ResourceTestUtil.clearRevs(get);
        log.debug("expect:" + base.toString());
        log.debug("actual:" + get.toString());
View Full Code Here

    }

    @Test(dataProvider = "ResourceTestData")
    public void testPostGetNoExtensionResource(Resource sr) {
        log.debug("post resource:" + sr.toString());
        sourceDocResource.post(sr, new StringSet("gettext;comment"), true);
        Resource get =
                sourceDocResource.getResource(sr.getName(), null).getEntity();
        Resource base = resourceTestFactory.getTextFlowTest();
        ResourceTestUtil.clearRevs(base);
        ResourceTestUtil.clearRevs(get);
View Full Code Here

    }

    public void testPutGetResourceMeta() {
        log.debug("test put get resource meta service");
        Resource res = resourceTestFactory.getTextFlowTest();
        sourceDocResource.putResource(res.getName(), res, new StringSet(
                "gettext;comment"));
        ResourceMeta sr = resourceTestFactory.getPoHeaderResourceMeta();
        sourceDocResource.putResourceMeta(sr.getName(), sr, new StringSet(
                "gettext;comment"));
        log.debug("get resource meta");
        ClientResponse<ResourceMeta> resourceGetResponse =
                sourceDocResource.getResourceMeta(sr.getName(), new StringSet(
                        "gettext;comment"));
        ResourceMeta get = resourceGetResponse.getEntity();
        ResourceTestUtil.clearRevs(sr);
        ResourceTestUtil.clearRevs(get);
        assertThat(sr.toString(), is(get.toString()));
View Full Code Here

        ResourceMeta sr = resourceTestFactory.getPoHeaderResourceMeta();
        ResourceMeta base = resourceTestFactory.getResourceMeta();
        sourceDocResource.putResourceMeta(sr.getName(), sr, null);
        log.debug("get resource meta");
        ClientResponse<ResourceMeta> resourceGetResponse =
                sourceDocResource.getResourceMeta(sr.getName(), new StringSet(
                        "gettext;comment"));
        ResourceMeta get = resourceGetResponse.getEntity();
        ResourceTestUtil.clearRevs(base);
        ResourceTestUtil.clearRevs(get);
        assertThat(get.toString(), is(base.toString()));
View Full Code Here

        log.debug("test put get resource meta service");
        Resource res = resourceTestFactory.getTextFlowTest();
        sourceDocResource.putResource(res.getName(), res, null);
        ResourceMeta sr = resourceTestFactory.getPoHeaderResourceMeta();
        ResourceMeta base = resourceTestFactory.getResourceMeta();
        sourceDocResource.putResourceMeta(sr.getName(), sr, new StringSet(
                "gettext;comment"));
        log.debug("get resource meta");
        ClientResponse<ResourceMeta> resourceGetResponse =
                sourceDocResource.getResourceMeta(sr.getName(), null);
        ResourceMeta get = resourceGetResponse.getEntity();
View Full Code Here

TOP

Related Classes of org.zanata.rest.StringSet

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.