use of org.sonatype.nexus.repository.security.internal.SimpleVariableResolverAdapter in project nexus-repository-r by sonatype-nexus-community.
the class RUploadHandlerTest method setup.
@Before
public void setup() throws IOException {
when(contentPermissionChecker.isPermitted(eq(REPO_NAME), eq(RFormat.NAME), eq(BreadActions.EDIT), any())).thenReturn(true);
underTest = new RUploadHandler(new SimpleVariableResolverAdapter(), contentPermissionChecker, emptySet());
when(repository.getName()).thenReturn(REPO_NAME);
when(storageFacet.txSupplier()).thenReturn(() -> storageTx);
when(repository.facet(StorageFacet.class)).thenReturn(storageFacet);
when(repository.facet(RHostedFacet.class)).thenReturn(rHostedFacet);
Asset asset = mockAsset(PACKAGE_PATH_FULL);
when(rHostedFacet.upload(PACKAGE_PATH_FULL, payload)).thenReturn(asset);
}
Aggregations