public void EmtpyVariable_CorrectVariable_ReturnException() { VariableSteps steps = new VariableSteps(variableController); Action act = () => steps.EmtpyVariable("test"); act.Should().Throw <Exception>() .WithMessage("Expected this.variableController.Variables {empty} to contain key \"test\" because переменная \"test\" не существует."); }
public void EmtpyVariable_CorrectVariable_ReturnException() { VariableSteps steps = new VariableSteps(variableController); Action act = () => steps.EmtpyVariable("test"); act.Should().Throw <Exception>() .Which.Message.Contains($"переменная \"test\" не существует"); }
public void EmtpyVariable_CorrectVariable_ReturnEmptyVariable() { var variable = new Variable() { Type = typeof(string), Value = string.Empty }; variableController.Variables.TryAdd("test", variable); VariableSteps steps = new VariableSteps(variableController); steps.EmtpyVariable("test"); var variableCheck = variableController.GetVariable("test"); variableCheck.Type.Should().Be(typeof(object)); variableCheck.Value.Should().BeNull(); }