Package org.apache.cloudstack.storage.datastore.util

Examples of org.apache.cloudstack.storage.datastore.util.ElastistorUtil$JobId


        String typicalBlobJson = "{\"blobId\":\"xxxx-xxxx\"}";
        BlobId id1 = mapper.readValue(typicalBlobJson, BlobId.class);
        TestCase.assertEquals("xxxx-xxxx", id1.blobId);

        String typicalJobJson = "{\"jobId\":\"yyyyyy\"}";
        JobId id2 = mapper.readValue(typicalJobJson, JobId.class);
        TestCase.assertEquals("yyyyyy", id2.jobId);

        String emptyJson = "{}";
        BlobId id3 = mapper.readValue(emptyJson, BlobId.class);
        JobId id4 = mapper.readValue(emptyJson, JobId.class);
        TestCase.assertNull(id3.blobId);
        TestCase.assertNull(id4.jobId);

        String extraStuffJson = "{\"blobId\":\"some-4by4\", \"junk\":0}";
        BlobId id5 = mapper.readValue(extraStuffJson, BlobId.class);
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.storage.datastore.util.ElastistorUtil$JobId

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.