use of org.sonatype.nexus.selector.VariableSource in project nexus-repository-r by sonatype-nexus-community.
the class RUploadHandlerTest method testHandle.
@Test
public void testHandle() throws IOException {
ComponentUpload component = createComponentUpload(PACKAGE_PATH, PACKAGE_NAME);
UploadResponse uploadResponse = underTest.handle(repository, component);
assertThat(uploadResponse.getAssetPaths(), contains(PACKAGE_PATH_FULL));
assertThat(uploadResponse.getComponentId().getValue(), is(NU_ID));
verify(contentPermissionChecker).isPermitted(eq(REPO_NAME), eq(RFormat.NAME), eq(BreadActions.EDIT), captor.capture());
VariableSource source = captor.getValue();
assertThat(source.get("format"), is(Optional.of(RFormat.NAME)));
assertThat(source.get("path"), is(Optional.of(PACKAGE_PATH_FULL)));
}
Aggregations