@Test public void testGetTestGenerationFactory() { CrashReproductionHelper helper = new CrashReproductionHelper(); CrashProperties.searchAlgorithm = CrashProperties.SearchAlgorithm.Single_Objective_GGA; TestGenerationStrategy strategy = CrashReproductionHelper.getTestGenerationFactory(); String strategyClassName = strategy.getClass().toString().substring(strategy.getClass().toString().indexOf("class ") + 6); assertEquals("eu.stamp.botsing.testgeneration.strategy.BotsingIndividualStrategy", strategyClassName); strategy = CrashReproductionHelper.getTestGenerationFactory(); strategyClassName = strategy.getClass().toString().substring(strategy.getClass().toString().indexOf("class ") + 6); assertEquals("eu.stamp.botsing.testgeneration.strategy.BotsingIndividualStrategy", strategyClassName); }
public static TestGenerationStrategy getTestGenerationFactory(){ switch (CrashProperties.searchAlgorithm){ case Guided_MOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); case DynaMOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); default: return new BotsingIndividualStrategy(); } }
CrashReproductionHelper { public static TestGenerationStrategy getTestGenerationFactory(){ switch (CrashProperties.searchAlgorithm){ case Guided_MOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); case DynaMOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); default: return new BotsingIndividualStrategy(); } } }
CrashReproductionHelper { public static TestGenerationStrategy getTestGenerationFactory(){ switch (CrashProperties.searchAlgorithm){ case Guided_MOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); case DynaMOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); default: return new BotsingIndividualStrategy(); } }  }
CrashReproductionHelper { public static TestGenerationStrategy getTestGenerationFactory(){ switch (CrashProperties.searchAlgorithm){ case Guided_MOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); case DynaMOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); default: return new BotsingIndividualStrategy(); } }  static TestGenerationStrategy getTestGenerationFactory(); }
CrashReproductionHelper { public static TestGenerationStrategy getTestGenerationFactory(){ switch (CrashProperties.searchAlgorithm){ case Guided_MOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); case DynaMOSA: return new MOSuiteStrategy(new TestGenerationUtility(),new FitnessFunctions()); default: return new BotsingIndividualStrategy(); } }  static TestGenerationStrategy getTestGenerationFactory();  }