@Test public void notOnDemandModule_containsSuggestions() { fileData = FakeFileData.builder(MP4_VIDEO).setSize(MEDIA_FILE_SIZE).build(); List<Suggestion> suggestions = new LargeFilesSuggester().processBundleZipEntry(BundleContext.create(1, false), fileData); assertThat(suggestions).hasSize(2); assertThat(suggestions) .containsExactly( Suggestion.create( Suggestion.IssueType.MEDIA_STREAMING, Suggestion.Category.LARGE_FILES, Payload.getDefaultInstance(), "Stream media file " + MP4_VIDEO + " from the internet to avoid bundling in apk", MEDIA_FILE_SIZE, null), Suggestion.create( Suggestion.IssueType.LARGE_FILES_DYNAMIC_FEATURE, Suggestion.Category.LARGE_FILES, Payload.getDefaultInstance(), "Place large file " + MP4_VIDEO + " inside an on demand dynamic-feature to avoid bundling in apk", MEDIA_FILE_SIZE, null)); }
@Override public ImmutableList<Suggestion> processBundleZipEntry(BundleContext context, FileData fileData) { return processFileEntry(context, fileData, isBundleAssetFile(fileData)); }
LargeFilesSuggester implements BundleEntrySuggester, ProjectTreeSuggester { @Override public ImmutableList<Suggestion> processBundleZipEntry(BundleContext context, FileData fileData) { return processFileEntry(context, fileData, isBundleAssetFile(fileData)); } }
LargeFilesSuggester implements BundleEntrySuggester, ProjectTreeSuggester { @Override public ImmutableList<Suggestion> processBundleZipEntry(BundleContext context, FileData fileData) { return processFileEntry(context, fileData, isBundleAssetFile(fileData)); } LargeFilesSuggester(); }
LargeFilesSuggester implements BundleEntrySuggester, ProjectTreeSuggester { @Override public ImmutableList<Suggestion> processBundleZipEntry(BundleContext context, FileData fileData) { return processFileEntry(context, fileData, isBundleAssetFile(fileData)); } LargeFilesSuggester(); @Override ImmutableList<Suggestion> processBundleZipEntry(BundleContext context, FileData fileData); @Override ImmutableList<Suggestion> processProjectEntry(GradleContext context, FileData fileData); }
LargeFilesSuggester implements BundleEntrySuggester, ProjectTreeSuggester { @Override public ImmutableList<Suggestion> processBundleZipEntry(BundleContext context, FileData fileData) { return processFileEntry(context, fileData, isBundleAssetFile(fileData)); } LargeFilesSuggester(); @Override ImmutableList<Suggestion> processBundleZipEntry(BundleContext context, FileData fileData); @Override ImmutableList<Suggestion> processProjectEntry(GradleContext context, FileData fileData);  }