public static void UpdateConfigFromFile(RuntimeConfigurationForGenerator runtimeConfiguration, string configFile) { using (TextReader file = new StreamReader(configFile)) { UpdateConfigFromFileContent(runtimeConfiguration, file.ReadToEnd()); } }
public bool Equals(RuntimeConfigurationForGenerator other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other.additionalStepAssemblies.SequenceEqual(additionalStepAssemblies)); }
public bool Equals(RuntimeConfigurationForGenerator other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other._additionalStepAssemblies.SequenceEqual(_additionalStepAssemblies) && Equals(other.ToolLanguage, ToolLanguage) && Equals(other.BindingCulture, BindingCulture) && other.DetectAmbiguousMatches.Equals(DetectAmbiguousMatches) && other.StopAtFirstError.Equals(StopAtFirstError) && Equals(other.MissingOrPendingStepsOutcome, MissingOrPendingStepsOutcome) && other.TraceSuccessfulSteps.Equals(TraceSuccessfulSteps) && other.TraceTimings.Equals(TraceTimings) && other.MinTracedDuration.Equals(MinTracedDuration)); }
public static void UpdateConfigFromFileContent(RuntimeConfigurationForGenerator runtimeConfiguration, string configFileContent) { XmlDocument configDocument; try { configDocument = new XmlDocument(); configDocument.LoadXml(configFileContent); } catch(Exception ex) { Debug.WriteLine(ex, "Config load error"); return; } var specFlowNode = configDocument.SelectSingleNode("/configuration/specFlow"); if (specFlowNode == null) return; var section = ConfigurationSectionHandler.CreateFromXml(specFlowNode); runtimeConfiguration.UpdateFromConfigFile(section); }
public SpecFlowProjectConfiguration() { GeneratorConfiguration = new GeneratorConfiguration(); // load defaults RuntimeConfiguration = new RuntimeConfigurationForGenerator(); // load defaults }
public bool Equals(RuntimeConfigurationForGenerator other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.additionalStepAssemblies.SequenceEqual(additionalStepAssemblies); }
public SpecFlowProject() { FeatureFiles = new List<SpecFlowFeatureFile>(); GeneratorConfiguration = new GeneratorConfiguration(); // load defaults RuntimeConfiguration = new RuntimeConfigurationForGenerator(); // load defaults }
public bool Equals(RuntimeConfigurationForGenerator other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other._additionalStepAssemblies.SequenceEqual(_additionalStepAssemblies) && Equals(other.ToolLanguage, ToolLanguage) && Equals(other.BindingCulture, BindingCulture) && other.DetectAmbiguousMatches.Equals(DetectAmbiguousMatches) && other.StopAtFirstError.Equals(StopAtFirstError) && Equals(other.MissingOrPendingStepsOutcome, MissingOrPendingStepsOutcome) && other.TraceSuccessfulSteps.Equals(TraceSuccessfulSteps) && other.TraceTimings.Equals(TraceTimings) && other.MinTracedDuration.Equals(MinTracedDuration); }