/// <summary> /// Copy constructor /// </summary> /// <param name="copy"></param> private JsTestContainer(JsTestContainer copy) : this(copy.Discoverer, copy.Source, copy.ExecutorUri) { this.timeStamp = copy.timeStamp; }
/// <summary> /// Adds a test container for the given file if it is a test file. /// This will first remove any existing container for that file /// </summary> /// <param name="file"></param> private void AddTestContainerIfTestFile(string file) { var isTestFile = IsTestFile(file); RemoveTestContainer(file); // Remove if there is an existing container if (isTestFile) { var container = new JsTestContainer(this, file.ToLowerInvariant(), Constants.ExecutorUri); cachedContainers.Add(container); } }
/// <summary> /// Adds a test container for the given file if it is a test file. /// This will first remove any existing container for that file /// </summary> /// <param name="file"></param> private void AddTestContainerIfTestFile(TestFileCandidate file) { // If a settings file don't add a container if (fileProbe.IsChutzpahSettingsFile(file.Path)) { return; } var isTestFile = IsTestFile(file.Path); RemoveTestContainer(file); // Remove if there is an existing container if (isTestFile) { ChutzpahTracer.TraceInformation("Added test container for '{0}'", file.Path); var container = new JsTestContainer(this, file.Path.ToLowerInvariant(), AdapterConstants.ExecutorUri); cachedContainers[container.Source] = container; } }