Esempio n. 1
0
#pragma warning disable CA1801 // Review unused parameters
        public new static void Initialize(TestContext context)
        {
            colorTest = new ColorRecognitionTest();

            // Initialize Colors and Shapes
            SerializedDataAccessManager dataAccessManager = null;

            try
            {
                dataAccessManager = new SerializedDataAccessManager(ConnectionString);
                dataAccessManager.RestoreBackup(@"..\..\..\..\Data\SerializedData.1345.dat");

                TestEngine.DataAccessManager = dataAccessManager;
                TestEngine.InitializeDatabase();

                dataAccessManager = null;
            }
            finally
            {
                dataAccessManager?.Dispose();
            }
        }
#pragma warning disable CA1801 // Review unused parameters
        public new static void Initialize(TestContext context)
        {
#if NETFX_CORE
            VisualProcessor.ImagingSettings.TemplateRecognitionSettings.ShapeOblongRecognitionLevel = 2;
#endif
            colorTest = new ColorRecognitionTest();
            shapeTest = new ShapeRecognitionTest();

            SerializedDataAccessManager dataAccessManager = null;
            try
            {
                dataAccessManager = new SerializedDataAccessManager(ConnectionString);
                dataAccessManager.RestoreBackup(@"..\..\..\..\Data\SerializedData.1346.dat");

                TestEngine.DataAccessManager = dataAccessManager;
                TestEngine.InitializeDatabase();

                dataAccessManager = null;
            }
            finally
            {
                dataAccessManager?.Dispose();
            }
        }