예제 #1
0
        // The Adapter is constructed using the default constructor.
        // We don't have any info to initialize it until one of the
        // ITestDiscovery or ITestExecutor methods is called. Each
        // Discover or Execute method must call this method.
        protected void Initialize(IDiscoveryContext context, IMessageLogger messageLogger)
        {
            TestEngine = new TestEngineClass();
            TestLog    = new TestLogger(messageLogger);
            Settings   = new AdapterSettings(TestLog);
            TestLog.InitSettings(Settings);

            try
            {
                Settings.Load(context);
                TestLog.Verbosity = Settings.Verbosity;
            }
            catch (Exception e)
            {
                TestLog.Warning("Error initializing RunSettings. Default settings will be used");
                TestLog.Warning(e.ToString());
            }
        }
예제 #2
0
 // The Adapter is constructed using the default constructor.
 // We don't have any info to initialize it until one of the
 // ITestDiscovery or ITestExecutor methods is called. Each
 // Discover or Execute method must call this method.
 protected void Initialize(IDiscoveryContext context, IMessageLogger messageLogger)
 {
     NUnitEngineAdapter.Initialize();
     TestLog  = new TestLogger(messageLogger);
     Settings = new AdapterSettings(TestLog);
     NUnitEngineAdapter.InitializeSettingsAndLogging(Settings, TestLog);
     TestLog.InitSettings(Settings);
     try
     {
         Settings.Load(context);
         TestLog.Verbosity = Settings.Verbosity;
         InitializeForbiddenFolders();
         SetCurrentWorkingDirectory();
     }
     catch (Exception e)
     {
         TestLog.Warning("Error initializing RunSettings. Default settings will be used");
         TestLog.Warning(e.ToString());
     }
 }