public static void UpdateConfigFromFile(RuntimeConfigurationForGenerator runtimeConfiguration, string configFile)
 {
     using (TextReader file = new StreamReader(configFile))
     {
         UpdateConfigFromFileContent(runtimeConfiguration, file.ReadToEnd());
     }
 }
예제 #2
0
 public bool Equals(RuntimeConfigurationForGenerator other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other.additionalStepAssemblies.SequenceEqual(additionalStepAssemblies));
 }
예제 #3
0
 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
 }
예제 #6
0
 public bool Equals(RuntimeConfigurationForGenerator other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.additionalStepAssemblies.SequenceEqual(additionalStepAssemblies);
 }
예제 #7
0
 public SpecFlowProject()
 {
     FeatureFiles = new List<SpecFlowFeatureFile>();
     GeneratorConfiguration = new GeneratorConfiguration(); // load defaults
     RuntimeConfiguration = new RuntimeConfigurationForGenerator(); // load defaults
 }
예제 #8
0
 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);
 }