Example #1
0
        public void AddConfig_ValidDataAndTags_ReturnVariables(List <ConfigFile> config, List <string> tags, Dictionary <string, Variable> variables)
        {
            // Act
            var optionConfig       = Options.Create(config);
            var variableDictionary = new ConcurrentDictionary <string, Variable>(variables);

            // Arrange
            var res = variableContext.AddConfig(optionConfig, tags);

            // Assert
            res.Variables.Should().BeEquivalentTo(variableDictionary);
        }
Example #2
0
        public void BeforeScenario(FeatureContext feature, ScenarioContext scenario)
        {
            ConfigurationExtension.Instance.Configuration = ConfigurationExtension.Instance.Configuration ?? ConfigurationFactory.Create(BinDirectory);
            config.Value = ConfigOptionsFactory.Create(ConfigurationExtension.Instance.Configuration);

            var tags = TagHelper.GetTagsBy(scenario);

            controller.AddConfig(config.Value, tags);
        }
Example #3
0
        public static void BeforeFeature(FeatureContext featureContext, VariableController variableController)
        {
            ConfigurationExtension.Instance.Configuration = ConfigurationExtension.Instance.Configuration ?? ConfigurationFactory.Create(BinDirectory);
            config.Value = ConfigOptionsFactory.Create(ConfigurationExtension.Instance.Configuration);

            var tags = TagHelper.GetTagsBy(featureContext);

            variableController.AddConfig(config.Value, tags);
        }
        public void BeforeScenario()
        {
            var tags = TagHelper.GetAllTags(featureContext, scenarioContext);

            variableController.AddConfig(config.Value, tags);
        }