Ejemplo n.º 1
0
        public void DeleteVariable_CorrectVariable_ReturnException()
        {
            VariableSteps steps = new VariableSteps(variableController);

            Action act = () => steps.DeleteVariable("test");

            act.Should().Throw <Exception>()
            .WithMessage("Expected this.variableController.Variables {empty} to contain key \"test\" because переменная \"test\" не существует.");
        }
        public void DeleteVariable_CorrectVariable_ReturnException()
        {
            VariableSteps steps = new VariableSteps(variableController);

            Action act = () => steps.DeleteVariable("test");

            act.Should().Throw <Exception>()
            .Which.Message.Contains($"переменная \"test\" не существует.");
        }
Ejemplo n.º 3
0
        public void DeleteVariable_CorrectVariable_ReturnFalse()
        {
            var variable = new Variable()
            {
                Type = typeof(string), Value = string.Empty
            };

            variableController.Variables.TryAdd("test", variable);

            VariableSteps steps = new VariableSteps(variableController);

            steps.DeleteVariable("test");

            var check = variableController.CheckVariableByKey("test");

            check.Should().BeFalse();
        }