@Test public void shouldGetPodAsset() throws IOException { asset = spy(new Asset()).name(POD_PATH); configAttributeMap(); when(storageTx.findAssetWithProperty(any(), any(), eq(bucket))).thenReturn(asset); cocoapodsFacet.getOrCreateAsset(POD_PATH, content, NAME, VERSION); verify(storageTx, times(0)).createAsset(bucket, component); verify(storageTx, times(1)).saveAsset(asset); verify(storageTx, times(0)).createComponent(bucket, format); verify(storageTx, times(0)).saveComponent(component); assertEquals(POD_PATH, asset.name()); }
@Override @TransactionalStoreBlob public Content getOrCreateAsset(final String assetPath, final Content content, final String componentName, final String componentVersion) throws IOException { return getOrCreateAsset(assetPath, content, componentName, componentVersion, null); }
CocoapodsFacetImpl extends FacetSupport implements CocoapodsFacet { @Override @TransactionalStoreBlob public Content getOrCreateAsset(final String assetPath, final Content content, final String componentName, final String componentVersion) throws IOException { return getOrCreateAsset(assetPath, content, componentName, componentVersion, null); } }
CocoapodsFacetImpl extends FacetSupport implements CocoapodsFacet { @Override @TransactionalStoreBlob public Content getOrCreateAsset(final String assetPath, final Content content, final String componentName, final String componentVersion) throws IOException { return getOrCreateAsset(assetPath, content, componentName, componentVersion, null); }  }
CocoapodsFacetImpl extends FacetSupport implements CocoapodsFacet { @Override @TransactionalStoreBlob public Content getOrCreateAsset(final String assetPath, final Content content, final String componentName, final String componentVersion) throws IOException { return getOrCreateAsset(assetPath, content, componentName, componentVersion, null); }  @Override @Nullable @TransactionalTouchBlob Content get(final String assetPath); @Override @TransactionalDeleteBlob boolean delete(final String assetPath); @Override @TransactionalStoreBlob Content getOrCreateAsset(final String assetPath,
                                  final Content content,
                                  final String componentName,
                                  final String componentVersion); @Override @TransactionalStoreBlob Content getOrCreateAsset(final String assetPath,
                                  final Content content); @Override @TransactionalStoreBlob Content getOrCreateAsset(final String assetPath,
                                  final Content content,
                                  @Nullable final Map<String, String> formatAttributes); @Override @Nullable @TransactionalTouchBlob T getAssetFormatAttribute(final String assetPath, final String attributeName); }
CocoapodsFacetImpl extends FacetSupport implements CocoapodsFacet { @Override @TransactionalStoreBlob public Content getOrCreateAsset(final String assetPath, final Content content, final String componentName, final String componentVersion) throws IOException { return getOrCreateAsset(assetPath, content, componentName, componentVersion, null); }  @Override @Nullable @TransactionalTouchBlob Content get(final String assetPath); @Override @TransactionalDeleteBlob boolean delete(final String assetPath); @Override @TransactionalStoreBlob Content getOrCreateAsset(final String assetPath,
                                  final Content content,
                                  final String componentName,
                                  final String componentVersion); @Override @TransactionalStoreBlob Content getOrCreateAsset(final String assetPath,
                                  final Content content); @Override @TransactionalStoreBlob Content getOrCreateAsset(final String assetPath,
                                  final Content content,
                                  @Nullable final Map<String, String> formatAttributes); @Override @Nullable @TransactionalTouchBlob T getAssetFormatAttribute(final String assetPath, final String attributeName);  }