Package com.rallydev.rest.request

Examples of com.rallydev.rest.request.CreateRequest


        object.addProperty("_ref", "/defect/1234");
        createResult.add("Object", object);

        JsonObject newDefect = new JsonObject();
        newDefect.addProperty("Name", "Foo");
        CreateRequest request = new CreateRequest("defect", newDefect);

        doReturn(new Gson().toJson(response)).when(api.client).doPost(request.toUrl(), request.getBody());
        CreateResponse createResponse = api.create(request);

        verify(api.client).doPost(request.toUrl(), request.getBody());
        Assert.assertTrue(createResponse.wasSuccessful());
        JsonObject createdObj = createResponse.getObject();
        assertEquals(createdObj.get("_ref").getAsString(), "/defect/1234");
    }
View Full Code Here

TOP

Related Classes of com.rallydev.rest.request.CreateRequest

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.