@Test public void shouldRetrieveListOfUrlsGivenATag() throws Exception { List<FileInfo> listOfFileInfo = getListOfFileInfo(); when(artifactRepository.findByTag(TAG,TENANTID)).thenReturn(listOfFileInfo); List<FileInfo> actual = storageService.retrieveByTag(TAG,TENANTID); assertEquals(listOfFileInfo, actual); }
public List<FileInfo> retrieveByTag(String tag, String tenantId) { return artifactRepository.findByTag(tag, tenantId); }
StorageService { public List<FileInfo> retrieveByTag(String tag, String tenantId) { return artifactRepository.findByTag(tag, tenantId); } }
StorageService { public List<FileInfo> retrieveByTag(String tag, String tenantId) { return artifactRepository.findByTag(tag, tenantId); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); }
StorageService { public List<FileInfo> retrieveByTag(String tag, String tenantId) { return artifactRepository.findByTag(tag, tenantId); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId); Resource retrieve(String fileStoreId, String tenantId); List<FileInfo> retrieveByTag(String tag, String tenantId); Map<String, String> getUrls(String tenantId, List<String> fileStoreIds); }
StorageService { public List<FileInfo> retrieveByTag(String tag, String tenantId) { return artifactRepository.findByTag(tag, tenantId); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId); Resource retrieve(String fileStoreId, String tenantId); List<FileInfo> retrieveByTag(String tag, String tenantId); Map<String, String> getUrls(String tenantId, List<String> fileStoreIds);  }