Package org.robotninjas.barge.jaxrs.ws

Examples of org.robotninjas.barge.jaxrs.ws.WsMessages$CommitMessage


    @Test
    public void testSerializationFullCommitMessage() throws IOException {
        FileTypeControl ftc = new FileTypeControl().floatingTimestampFormat(new String[]{"ISO8601"});
        ControlFile cf = new ControlFile("Replace", null, ftc, null);
        CommitMessage commit = new CommitMessage()
                .filename("hoo-ya.csv")
                .relativeTo("datasync/id/some-4by4/completed/2014/6/2/hoo-ya.csv")
                .chunks(Arrays.asList("1234", "2345"))
                .control(cf)
                .expectedSize(11001001L);
View Full Code Here


        TestCase.assertEquals(expectedJson, mapper.writeValueAsString(commit));
    }

    @Test
    public void testSerializationIncompleteCommitMessage() throws IOException {
        CommitMessage commit = new CommitMessage()
                .filename("hoo-ya.csv")
                .chunks(Arrays.asList("1234", "2345"));
        String expectedJson = "{" +
                "\"chunks\":[\"1234\",\"2345\"]," +
                "\"filename\":\"hoo-ya.csv\"," +
View Full Code Here

TOP

Related Classes of org.robotninjas.barge.jaxrs.ws.WsMessages$CommitMessage

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.