Exemplo n.º 1
0
        public void SetupScanner()
        {
            _database = A.Fake <IGraphDatabase>();

            var config = new ReflectionScannerConfiguration {
                Assemblies = new[] { AssemblyPath }
            };

            _scanner = new ReflectionScanner(config, ModelFactory, _database, A.Fake <ILogger <ReflectionScanner> >());
        }
Exemplo n.º 2
0
        public void SetupScanner()
        {
            _tx = A.Fake <IGraphDatabaseTransaction>();

            var database = A.Fake <IGraphDatabase>();

            A.CallTo(() => database.BeginTransaction()).Returns(_tx);

            var config = new ReflectionScannerConfiguration {
                Assemblies = new[] { AssemblyPath }
            };

            _scanner = new ReflectionScanner(config, ModelFactory, database, A.Fake <ILogger <ReflectionScanner> >());
        }
Exemplo n.º 3
0
        public void InitializeChellange(int variant)
        {
            try
            {
                _map    = new Map(variant, ReflectionScanner.ScanLibs().Length *Runner.InitialRobotsCount);
                _runner = new Runner(_map, ModelChanged);
                ColorsFactory.Initialize(_runner.Owners);
                PaintRobots(_runner.Robots);
                PaintStations();
                this.Height = 1250;
                BindStatistics();
            }

            catch (FileLoadException ex)
            {
                MessageBox.Show($"Error loading dll. Possible reason - dll was downloaded from Internet and should bu unblocked (in file properties). Error: {ex.Message}. Internal exception {ex.InnerException}");
                throw;
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Error: {ex.Message}. Internal exception {ex.InnerException}");
                throw;
            }
        }