public void StoreAsVariableEncriptedString_ValidValue_ReturnNewVariable() { VariableSteps steps = new VariableSteps(variableController); var str = Encryptor.Encrypt("test"); steps.StoreAsVariableEncriptedString(str, "test"); var variableCheck = variableController.GetVariable("test"); variableCheck.Type.Should().Be(typeof(string)); variableCheck.Value.Should().Be("test"); }
public void StoreAsVariableEncriptedString_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.StoreAsVariableEncriptedString(null, "test"); act.Should().Throw <Exception>() .Which.Message.Contains($"Переменная \"test\" уже существует"); }