public void StoreAsVariableText_ValidValue_ReturnNewVariable() { VariableSteps steps = new VariableSteps(variableController); steps.StoreAsVariableText("test", "test"); var variableCheck = variableController.GetVariable("test"); variableCheck.Type.Should().Be(typeof(string)); variableCheck.Value.Should().Be("test"); }
public void StoreAsVariableText_CorrectVariable_ReturnException() { var variable = new Variable() { Type = typeof(string), Value = string.Empty }; variableController.Variables.TryAdd("test", variable); VariableSteps steps = new VariableSteps(variableController); Action act = () => steps.StoreAsVariableText("test", null); act.Should().Throw <Exception>() .Which.Message.Contains($"Переменная \"test\" уже существует"); }