Examples of BoxItemRestoreRequestObject


Examples of com.box.boxjavalibv2.requests.requestobjects.BoxItemRestoreRequestObject

    private static final String NAME = "name";
    private static final String PARENT = "parent";

    @Test
    public void testDefaultObjectHasNoField() {
        BoxItemRestoreRequestObject obj = BoxItemRestoreRequestObject.restoreItemRequestObject();
        Assert.assertNull(obj.getFromEntity(NAME));
        Assert.assertNull(obj.getFromEntity(PARENT));
    }
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxItemRestoreRequestObject

    }

    @Test
    public void testNameInObject() throws BoxRestException, BoxJSONException {
        String name = "testname";
        BoxItemRestoreRequestObject obj = BoxItemRestoreRequestObject.restoreItemRequestObject().setNewName(name);

        Assert.assertEquals(name, obj.getFromEntity(NAME));
    }
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxItemRestoreRequestObject

    }

    @Test
    public void testParentInObject() throws BoxRestException, BoxJSONException {
        String parentid = "testid";
        BoxItemRestoreRequestObject obj = BoxItemRestoreRequestObject.restoreItemRequestObject().setNewParent(parentid);

        MapJSONStringEntity entity = (MapJSONStringEntity) obj.getFromEntity(PARENT);

        Assert.assertEquals(parentid, entity.get(BoxFolder.FIELD_ID));
    }
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxItemRestoreRequestObject

    @Test
    public void testBothParentAndNameInObject() throws BoxRestException, BoxJSONException {
        String name = "testname";
        String parentid = "testid";
        BoxItemRestoreRequestObject obj = BoxItemRestoreRequestObject.restoreItemRequestObject().setNewName(name).setNewParent(parentid);

        Assert.assertEquals(name, obj.getFromEntity(NAME));
        MapJSONStringEntity entity = (MapJSONStringEntity) obj.getFromEntity(PARENT);

        Assert.assertEquals(parentid, entity.get(BoxFolder.FIELD_ID));
    }
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.