Beispiel #1
0
        public async Task <IObjectRoot <SessionController> > CreateSession(MethodIdentifier methodIdentifier, List <string> testAssemblies, bool auto)
        {
            _whiteCache.Pause(true);
            try
            {
                AutoCreationController creationController = _autoCreationControllerFactory.Create();
                var choices = await creationController.Run(methodIdentifier, testAssemblies, auto);

                var original = new OriginalCodebase(LoadAssemblies().Result, testAssemblies.ToEmptyIfNull().ToList());
                _log.Info("Created original codebase with assemblies to mutate: " + original.ModulesToMutate.Select(m => m.Module.Name).MakeString());
                return(_sessionFactory.CreateWithBindings(choices, original));
            }
            finally
            {
                _whiteCache.Pause(false);
            }
        }
Beispiel #2
0
        public void CreateConfiguration()
        {
            DisposeConfiguration();
            var optionsModel = _optionsManager.ReadOptions();

            IWhiteSource whiteCache;

            if (optionsModel.WhiteCacheThreadsCount != 0)
            {
                whiteCache = _whiteCacheFactory.CreateWithParams(optionsModel.WhiteCacheThreadsCount, optionsModel.WhiteCacheThreadsCount);
            }
            else
            {
                whiteCache = _whiteCacheFactory.CreateWithParams(1, 1);
            }
            whiteCache.Initialize();
            _configuration = _continuousConfigurationFactory.CreateWithBindings(optionsModel, whiteCache);
        }