Package dropbox.client

Examples of dropbox.client.FileMoveCollisionException


   
    @Test
    public void testConflict() throws Exception {
        addToSortbox("foo");
        setRules(new Rule(RuleType.NAME_CONTAINS, "foo", "/foo", 0, null));
        doThrow(new FileMoveCollisionException(null))
          .when(testClient).move(Dropbox.getSortboxPath() + "/foo", "/foo/foo");
        doThrow(new FileMoveCollisionException(null))
          .when(testClient).move(Dropbox.getSortboxPath() + "/foo", "/foo/foo conflict");
       
        RuleUtils.runRules(u);
        verify(testClient).move(Dropbox.getSortboxPath() + "/foo", "/foo/foo conflict 2");
    }
View Full Code Here


        }

        Logger.error("Failed moving from %s to %s Error: %s", from, to, getError(resp));
        // 400 indicates file name collision
        if (Integer.valueOf(400).equals(resp.getStatus())) {
            throw new FileMoveCollisionException(String.format("From: %s To: %s", from, to));
        }
    }
View Full Code Here

TOP

Related Classes of dropbox.client.FileMoveCollisionException

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.