Пример #1
0
        public void AddOrUpdateVariables_should_set_variable()
        {
            // Arrange
            var sessionVariables = new SessionVariables();

            // Act
            sessionVariables.AddOrUpdateVariables(new Dictionary<string, string>()
            {
                {"nano", "leaf"},
                {"light", "bulb"}
            });

            // Assert
            Assert.That(sessionVariables.GetVariableValue("nano"), Is.EqualTo("leaf"));
            Assert.That(sessionVariables.GetVariableValue("light"), Is.EqualTo("bulb"));
        }
Пример #2
0
        public void AddGlobalVariables_should_add_variables_from_config()
        {
            // Arrange
            var config = new Config();
            config.Variables.Add(new Variable("eggs", "ham"));
            var sessionVariables = new SessionVariables();

            // Act
            sessionVariables.AddGlobalVariables(config);

            // Assert
            Assert.That(sessionVariables.GetVariableValue("eggs"), Is.EqualTo("ham"));
        }
Пример #3
0
        public void AddGlobalVariables_should_add_baseurl_as_variable()
        {
            // Arrange
            var config = new Config();
            config.BaseUrl = "mybaseurl";
            var sessionVariables = new SessionVariables();

            // Act
            sessionVariables.AddGlobalVariables(config);

            // Assert
            Assert.That(sessionVariables.GetVariableValue("baseurl"), Is.EqualTo("mybaseurl"));
        }
Пример #4
0
        public void AddOrUpdateVariable_should_set_variable()
        {
            // Arrange
            var sessionVariables = new SessionVariables();

            // Act
            sessionVariables.AddOrUpdateVariable("nano", "leaf");

            // Assert
            Assert.That(sessionVariables.GetVariableValue("nano"), Is.EqualTo("leaf"));
        }