Package org.apache.jackrabbit.mongomk.command

Examples of org.apache.jackrabbit.mongomk.command.GetBlobLengthCommandMongo


    @Test
    public void testGetBlobLength() throws Exception {
        int blobLength = 100;
        String blobId = createAndWriteBlob(blobLength);

        GetBlobLengthCommandMongo command = new GetBlobLengthCommandMongo(mongoConnection, blobId);
        long length = command.execute();
        assertEquals(blobLength, length);
    }
View Full Code Here


        assertEquals(blobLength, length);
    }

    @Test
    public void testNonExistantBlobLength() throws Exception {
        GetBlobLengthCommandMongo command = new GetBlobLengthCommandMongo(mongoConnection,
                "nonExistantBlobId");
        try {
            command.execute();
            fail("Exception expected");
        } catch (Exception expected) {
        }
    }
View Full Code Here

        this.commandExecutor = new CommandExecutorImpl();
    }

    @Override
    public long getBlobLength(String blobId) throws Exception {
        Command<Long> command = new GetBlobLengthCommandMongo(mongoConnection, blobId);
        return commandExecutor.execute(command);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mongomk.command.GetBlobLengthCommandMongo

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.