Search in sources :

Example 6 with FileContentInput

use of com.google.gerrit.extensions.api.changes.FileContentInput in project gerrit by GerritCodeReview.

the class ChangeEditIT method changeEditRest.

@Test
public void changeEditRest() throws Exception {
    createEmptyEditFor(changeId);
    FileContentInput in = new FileContentInput();
    in.content = RawInputUtil.create(CONTENT_NEW);
    adminRestSession.putRaw(urlEditFile(changeId, FILE_NAME), in.content).assertNoContent();
    ensureSameBytes(getFileContentOfEdit(changeId, FILE_NAME), CONTENT_NEW);
}
Also used : FileContentInput(com.google.gerrit.extensions.api.changes.FileContentInput) AbstractDaemonTest(com.google.gerrit.acceptance.AbstractDaemonTest) Test(org.junit.Test)

Aggregations

AbstractDaemonTest (com.google.gerrit.acceptance.AbstractDaemonTest)6 FileContentInput (com.google.gerrit.extensions.api.changes.FileContentInput)6 Test (org.junit.Test)6 RestResponse (com.google.gerrit.acceptance.RestResponse)1