Ejemplo n.º 1
0
        public SessionController(
            IDispatcherExecute dispatcher,
            CommonServices svc,
            MutantDetailsController mutantDetailsController,
            IMutantsContainer mutantsContainer,
            ITestsContainer testsContainer,
            IFactory <ResultsSavingController> resultsSavingFactory,
            IFactory <TestingProcess> testingProcessFactory,
            IRootFactory <TestingMutant> testingMutantFactory,
            MutationSessionChoices choices,
            OptionsModel options)
        {
            _dispatcher = dispatcher;
            _svc        = svc;
            _mutantDetailsController = mutantDetailsController;
            _mutantsContainer        = mutantsContainer;
            _testsContainer          = testsContainer;
            _resultsSavingFactory    = resultsSavingFactory;
            _testingProcessFactory   = testingProcessFactory;
            _testingMutantFactory    = testingMutantFactory;
            _choices = choices;

            _sessionState         = SessionState.NotStarted;
            _sessionEventsSubject = new Subject <SessionEventArgs>();
            _subscriptions        = new List <IDisposable>();
            _options = options;
        }
Ejemplo n.º 2
0
        public SessionController(
            IDispatcherExecute dispatcher,
            CommonServices svc,
            MutantDetailsController mutantDetailsController,
            IMutantsContainer mutantsContainer,
            ITestsContainer testsContainer,
            IFactory<ResultsSavingController> resultsSavingFactory,
            IFactory<TestingProcess> testingProcessFactory,
            IRootFactory<TestingMutant> testingMutantFactory,
            MutationSessionChoices choices)
        {
            _dispatcher = dispatcher;
            _svc = svc;
            _mutantDetailsController = mutantDetailsController;
            _mutantsContainer = mutantsContainer;
            _testsContainer = testsContainer;
            _resultsSavingFactory = resultsSavingFactory;
            _testingProcessFactory = testingProcessFactory;
            _testingMutantFactory = testingMutantFactory;
            _choices = choices;

            _sessionState = SessionState.NotStarted;
            _sessionEventsSubject = new Subject<SessionEventArgs>();
            _subscriptions = new List<IDisposable>();


        }
Ejemplo n.º 3
0
        public AutoCreationController(
            IDispatcherExecute dispatcher,
            CreationViewModel viewModel,
            ITypesManager typesManager,
            SessionConfiguration sessionConfiguration,
            OptionsModel options,
            IFactory <SessionCreator> sessionCreatorFactory,
            IDispatcherExecute execute,
            CommonServices svc)
        {
            _dispatcher           = dispatcher;
            _viewModel            = viewModel;
            _typesManager         = typesManager;
            _sessionConfiguration = sessionConfiguration;
            _options = options;
            _sessionCreatorFactory = sessionCreatorFactory;
            _execute = execute;
            _svc     = svc;

            _viewModel.CommandCreateMutants = new SmartCommand(CommandOk,
                                                               () => _viewModel.TypesTreeMutate.Assemblies != null && _viewModel.TypesTreeMutate.Assemblies.Count != 0 &&
                                                               _viewModel.TypesTreeToTest.TestAssemblies != null && _viewModel.TypesTreeToTest.TestAssemblies.Count != 0 &&
                                                               _viewModel.MutationsTree.MutationPackages.Count != 0)
                                              .UpdateOnChanged(_viewModel.TypesTreeMutate, _ => _.Assemblies)
                                              .UpdateOnChanged(_viewModel.TypesTreeToTest, _ => _.TestAssemblies)
                                              .UpdateOnChanged(_viewModel.MutationsTree, _ => _.MutationPackages);
        }
 public AutoCreationController(
     IDispatcherExecute dispatcher,
     CreationViewModel viewModel,
     ITypesManager typesManager,
     SessionConfiguration sessionConfiguration,
     OptionsModel options,
     IFactory<SessionCreator> sessionCreatorFactory,
     IDispatcherExecute execute,
     CommonServices svc)
 {
     _dispatcher = dispatcher;
     _viewModel = viewModel;
     _typesManager = typesManager;
     _sessionConfiguration = sessionConfiguration;
     _options = options;
     _sessionCreatorFactory = sessionCreatorFactory;
     _execute = execute;
     _svc = svc;
     
     _viewModel.CommandCreateMutants = new SmartCommand(CommandOk,
        () => _viewModel.TypesTreeMutate.Assemblies != null && _viewModel.TypesTreeMutate.Assemblies.Count != 0
              && _viewModel.TypesTreeToTest.TestAssemblies != null && _viewModel.TypesTreeToTest.TestAssemblies.Count != 0
              && _viewModel.MutationsTree.MutationPackages.Count != 0)
            .UpdateOnChanged(_viewModel.TypesTreeMutate, _ => _.Assemblies)
            .UpdateOnChanged(_viewModel.TypesTreeToTest, _ => _.TestAssemblies)
            .UpdateOnChanged(_viewModel.MutationsTree, _ => _.MutationPackages);
 }