Esempio n. 1
0
 public void SetUp()
 {
     Working = true;
     _currentCreator?.CleanUp();
     _currentCreator = GenerateNew();
     _currentCreator.SetUp();
     Working = false;
 }
        public void Generate()
        {
            Working = true;

            _currentCreator?.CleanUp();

            _currentCreator = GenerateNew();
            _currentCreator.SetUp();

            _stopwatch = Stopwatch.StartNew();
            _currentCreator.Run();

            MainThreadDispatch.Instance().Enqueue(() => { Working = false; });

            StartCoroutine(FinishWork());
        }
Esempio n. 3
0
        protected override IEnumerator MainWork(bool firstRun = false, bool measure = true)
        {
            _working = true;
            TerrainCreator.SetUp();
            if (measure)
            {
                using (Measure.Scope(new SampleGroupDefinition(
                                         Common.DefinitionName(TerrainCreator.GetType().Name, firstRun ? Common.FirstKeyWord : string.Empty),
                                         TestSettings.SampleUnit)))
                {
                    yield return(RunStatement());
                }
            }
            else
            {
                yield return(RunStatement());
            }

            TerrainCreator.CleanUp();
        }
Esempio n. 4
0
        protected override void MainWork(bool firstRun = false, bool measure = true)
        {
            TerrainCreator.SetUp();
            if (measure)
            {
                using (Measure.Scope(new SampleGroupDefinition(
                                         Utils.Common.DefinitionName(
                                             TerrainCreator.GetType().Name,
                                             firstRun ? Utils.Common.FirstKeyWord : string.Empty
                                             ),
                                         TestSettings.SampleUnit
                                         )))
                {
                    RunStatement();
                }
            }
            else
            {
                RunStatement();
            }

            TerrainCreator.CleanUp();
        }