@Test void testGetMetadataActionADD() { RepositoryCollection source = mock(RepositoryCollection.class); doReturn(true).when(source).hasRepository(EMX_ATTRIBUTES); assertEquals(ADD, emxImportService.getMetadataAction(source)); }
@Override public MetadataAction getMetadataAction(RepositoryCollection source) { if (source.hasRepository(EMX_ATTRIBUTES) || source.hasRepository(EMX_PACKAGES) || source.hasRepository(EMX_LANGUAGES) || source.hasRepository(EMX_I18NSTRINGS)) { return MetadataAction.ADD; } else { return MetadataAction.IGNORE; } }
EmxImportService implements ImportService { @Override public MetadataAction getMetadataAction(RepositoryCollection source) { if (source.hasRepository(EMX_ATTRIBUTES) || source.hasRepository(EMX_PACKAGES) || source.hasRepository(EMX_LANGUAGES) || source.hasRepository(EMX_I18NSTRINGS)) { return MetadataAction.ADD; } else { return MetadataAction.IGNORE; } } }
EmxImportService implements ImportService { @Override public MetadataAction getMetadataAction(RepositoryCollection source) { if (source.hasRepository(EMX_ATTRIBUTES) || source.hasRepository(EMX_PACKAGES) || source.hasRepository(EMX_LANGUAGES) || source.hasRepository(EMX_I18NSTRINGS)) { return MetadataAction.ADD; } else { return MetadataAction.IGNORE; } } EmxImportService(MetadataParser parser, ImportWriter writer, DataService dataService); }
EmxImportService implements ImportService { @Override public MetadataAction getMetadataAction(RepositoryCollection source) { if (source.hasRepository(EMX_ATTRIBUTES) || source.hasRepository(EMX_PACKAGES) || source.hasRepository(EMX_LANGUAGES) || source.hasRepository(EMX_I18NSTRINGS)) { return MetadataAction.ADD; } else { return MetadataAction.IGNORE; } } EmxImportService(MetadataParser parser, ImportWriter writer, DataService dataService); @Override boolean canImport(File file, RepositoryCollection source); @Override EntityImportReport doImport(
      final RepositoryCollection source,
      MetadataAction metadataAction,
      DataAction dataAction,
      @Nullable @CheckForNull String packageId); EntityImportReport doImport(EmxImportJob job); @Override EntitiesValidationReport validateImport(RepositoryCollection source); @Override int getOrder(); @Override List<MetadataAction> getSupportedMetadataActions(); @Override List<DataAction> getSupportedDataActions(); @Override boolean getMustChangeEntityName(); @Override Set<String> getSupportedFileExtensions(); @Override LinkedHashMap<String, Boolean> determineImportableEntities(
      MetaDataService metaDataService,
      RepositoryCollection repositoryCollection,
      String selectedPackage); @Override MetadataAction getMetadataAction(RepositoryCollection source); }
EmxImportService implements ImportService { @Override public MetadataAction getMetadataAction(RepositoryCollection source) { if (source.hasRepository(EMX_ATTRIBUTES) || source.hasRepository(EMX_PACKAGES) || source.hasRepository(EMX_LANGUAGES) || source.hasRepository(EMX_I18NSTRINGS)) { return MetadataAction.ADD; } else { return MetadataAction.IGNORE; } } EmxImportService(MetadataParser parser, ImportWriter writer, DataService dataService); @Override boolean canImport(File file, RepositoryCollection source); @Override EntityImportReport doImport(
      final RepositoryCollection source,
      MetadataAction metadataAction,
      DataAction dataAction,
      @Nullable @CheckForNull String packageId); EntityImportReport doImport(EmxImportJob job); @Override EntitiesValidationReport validateImport(RepositoryCollection source); @Override int getOrder(); @Override List<MetadataAction> getSupportedMetadataActions(); @Override List<DataAction> getSupportedDataActions(); @Override boolean getMustChangeEntityName(); @Override Set<String> getSupportedFileExtensions(); @Override LinkedHashMap<String, Boolean> determineImportableEntities(
      MetaDataService metaDataService,
      RepositoryCollection repositoryCollection,
      String selectedPackage); @Override MetadataAction getMetadataAction(RepositoryCollection source);  }