Example #1
0
 /// <summary>
 /// Setup the delegate for GetComponent request which is delegated from the MockHost
 /// </summary>
 public Common_Tests(GetComponentFromTestDelegate getComponent, bool createMSBuildProject)
 {
     _getComponent = getComponent;
     _configCache = null;
     _host = null;
     _requestEngine = null;
     _testDataProvider = null;
     _createMSBuildProject = createMSBuildProject;
     _tempPath = System.IO.Path.GetTempPath();
 }
Example #2
0
 /// <summary>
 /// cleanup for each tests
 /// </summary>
 public void TearDown()
 {
     _host.ShutdownComponent();
     _host = null;
     _configCache = null;
     _requestEngine.CleanupForBuild();
     _requestEngine.ShutdownComponent();
     _requestEngine = null;
     _testDataProvider = null;
 }
Example #3
0
        /// <summary>
        /// Sets the build component host for this object.
        /// </summary>
        /// <param name="host">The host.</param>
        public void InitializeComponent(IBuildComponentHost host)
        {
            ErrorUtilities.VerifyThrowArgumentNull(host, "host");
            ErrorUtilities.VerifyThrow(_componentHost == null, "BuildRequestEngine already initialized!");
            _componentHost = host;
            _configCache = (IConfigCache)host.GetComponent(BuildComponentType.ConfigCache);

            // Create a local configuration cache which is used to temporarily hold configurations which don't have
            // proper IDs yet.  We don't get this from the global config cache because that singleton shouldn't be polluted
            // with our temporaries.
            // NOTE: Because we don't get this from the component host, we cannot override it.
            ConfigCache unresolvedConfigCache = new ConfigCache();
            unresolvedConfigCache.InitializeComponent(host);
            _unresolvedConfigurations = unresolvedConfigCache;
        }
Example #4
0
 /// <summary>
 /// Setup for each tests
 /// </summary>
 public void Setup()
 {
     _host = new QAMockHost(this.GetComponent);
     _testDataProvider = new TestDataProvider();
     _requestEngine = new BuildRequestEngine();
     _requestEngine.InitializeComponent(_host);
     _requestEngine.InitializeForBuild(new NodeLoggingContext(_host.LoggingService, 0, false));
     _configCache = new ConfigCache();
 }
Example #5
0
        /// <summary>
        /// cleanup for each tests
        /// </summary>
        public void TearDown()
        {
            this.host.ShutdownComponent();
            this.host = null;
            this.configCache = null;
            this.requestEngine.CleanupForBuild();
            this.requestEngine.ShutdownComponent();
            this.requestEngine = null;
            this.testDataProvider = null;

        }