Examples of startCopyTrans()


Examples of org.zanata.rest.client.ICopyTransResource.startCopyTrans()

    public void runCopyTrans(String projectSlug, String iterationSlug,
            String docId) {
        ICopyTransResource resource =
                zanataProxyFactory.getCopyTransResource();
        CopyTransStatus copyTransStatus =
                resource.startCopyTrans(projectSlug,
                        iterationSlug, docId);
        log.info("copyTrans started: {}-{}-{}", projectSlug, iterationSlug, docId);
        while (copyTransStatus.isInProgress()) {
            try {
                Thread.sleep(1000);
View Full Code Here

Examples of org.zanata.rest.client.ICopyTransResource.startCopyTrans()

        if (copyTrans) {
            log.info("start copyTrans for {} - {}", projectSlug, iterationSlug);
            ICopyTransResource copyTransResource =
                    zanataProxyFactory.getCopyTransResource();
            CopyTransStatus copyTransStatus =
                    copyTransResource
                            .startCopyTrans(projectSlug, iterationSlug,
                                    sourceResource.getName());
            while (copyTransStatus.isInProgress()) {
                try {
                    Thread.sleep(1000);
View Full Code Here

Examples of org.zanata.rest.client.ICopyTransResource.startCopyTrans()

    @Test
    public void startCopyTrans() {
        ICopyTransResource copyTransResource =
                getClientRequestFactory().createProxy(ICopyTransResource.class);

        copyTransResource.startCopyTrans("sample-project", "1.0",
                "my/path/document.txt");
        verify(mockIdentity, atLeastOnce()).checkPermission(eq("copy-trans"),
                anyVararg());
    }
View Full Code Here

Examples of org.zanata.rest.client.ICopyTransResource.startCopyTrans()

    @Test
    public void startCopyTransAndCheckStatus() {
        ICopyTransResource copyTransResource =
                getClientRequestFactory().createProxy(ICopyTransResource.class);

        copyTransResource.startCopyTrans("sample-project", "1.0",
                "my/path/document.txt");

        CopyTransStatus status =
                copyTransResource.getCopyTransStatus("sample-project", "1.0",
                        "my/path/document.txt");
View Full Code Here

Examples of org.zanata.rest.client.ICopyTransResource.startCopyTrans()

    public void copyTransForUnknownDocument() {
        ICopyTransResource copyTransResource =
                getClientRequestFactory().createProxy(ICopyTransResource.class);

        try {
            copyTransResource.startCopyTrans("sample-project", "1.0",
                    "/an/inexisting/document.txt");
            assertThat(
                    "startCopyTrans should have returned 404 in the form of an exception.",
                    false);
        } catch (ClientResponseFailure failure) {
View Full Code Here

Examples of org.zanata.rest.client.ICopyTransResource.startCopyTrans()

                getClientRequestFactory().createProxy(ICopyTransResource.class);
        doThrow(new AuthorizationException("Expected Exception")).when(
                mockIdentity).checkPermission(eq("copy-trans"), anyVararg());

        try {
            copyTransResource.startCopyTrans("sample-project", "1.0",
                    "my/path/document.txt");
            assertThat(
                    "startCopyTrans should have returned 401 in the form of an exception.",
                    false);
        } catch (ClientResponseFailure failure) {
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.