use of com.artipie.asto.test.ContentIs in project maven-adapter by artipie.
the class UploadSliceTest method savesDataToTempUpload.
@Test
void savesDataToTempUpload() {
final byte[] data = "jar content".getBytes();
MatcherAssert.assertThat("Wrong response status, CREATED is expected", this.ums, new SliceHasResponse(new RsHasStatus(RsStatus.CREATED), new RequestLine(RqMethod.PUT, "/com/artipie/asto/0.1/asto-0.1.jar"), new Headers.From(new ContentLength(data.length)), new Content.From(data)));
MatcherAssert.assertThat("Uploaded data were not saved to storage", this.asto.value(new Key.From(".upload/com/artipie/asto/0.1/asto-0.1.jar")).join(), new ContentIs(data));
}
Aggregations