/*
 * Copyright (c) 2012-2020 University Corporation for Atmospheric Research/Unidata.
 * See LICENSE for license information.
 */
package edu.ucar.unidata.rosetta.config;

import edu.ucar.unidata.rosetta.domain.wizard.WizardData;
import edu.ucar.unidata.rosetta.init.resources.ResourceLoader;
import edu.ucar.unidata.rosetta.repository.wizard.WizardDataDao;
import edu.ucar.unidata.rosetta.repository.wizard.JdbcWizardDataDao;
import edu.ucar.unidata.rosetta.service.ResourceManager;
import edu.ucar.unidata.rosetta.service.batch.BatchFileManager;
import edu.ucar.unidata.rosetta.service.wizard.*;
import java.util.Properties;
import org.mockito.Mockito;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Mock object dependencies used for controller tests (found via component scan in applicationContext-test.xml)
 */
@Configuration
public class TestContext {


  @Bean
  public BatchFileManager batchFileManager() {
    return Mockito.mock(BatchFileManager.class);
  }

  @Bean
  public WizardManager wizardManager() {
    return Mockito.mock(WizardManager.class);
  }

  @Bean
  public ResourceManager resourceManager() {
    return Mockito.mock(ResourceManager.class);
  }

  // todo: DataManager no longer exits - does this need replaced?
  // @Bean
  // public DataManager dataManager() {
  // return Mockito.mock(DataManager.class);
  // }

  @Bean
  public FileManager fileParserManager() {
    return Mockito.mock(FileManager.class);
  }

  @Bean
  public MetadataManager metadataManager() {
    return Mockito.mock(MetadataManager.class);
  }

  @Bean
  public ResourceLoader resourceLoader() {
    return Mockito.mock(ResourceLoader.class);
  }

  @Bean
  public UploadedFileManager uploadedFileManager() {
    return Mockito.mock(UploadedFileManager.class);
  }

}

@@ -202,229 +202,37 @@
 tta.
-domain.wizard.WizardData;%0Aimport edu.ucar.unidata.rosetta.init.resources.ResourceLoader;%0Aimport edu.ucar.unidata.rosetta.repository.wizard.WizardDataDao;%0Aimport edu.ucar.unidata.rosetta.repository.wizard.JdbcWizardDataDao
+init.resources.ResourceLoader
 ;%0Aim
@@ -404,37 +404,8 @@
 .*;%0A
-import java.util.Properties;%0A
 impo
@@ -705,17 +705,16 @@
 text %7B%0A%0A
-%0A
   @Bean%0A
@@ -1024,178 +1024,8 @@
  %7D%0A%0A
-  // todo: DataManager no longer exits - does this need replaced?%0A  // @Bean%0A  // public DataManager dataManager() %7B%0A  // return Mockito.mock(DataManager.class);%0A  // %7D%0A%0A
   @B
@@ -1442,15 +1442,14 @@
 class);%0A
+
   %7D%0A
-%0A
 %7D%0A

clean up of mock object dependancies