public void CheckVariableIsNull_CorrectVarName_ReturnTrue() { var variable = new Variable() { Type = typeof(string), Value = null }; variableController.Variables.TryAdd("test", variable); VariableSteps steps = new VariableSteps(variableController); steps.CheckVariableIsNull("test"); }
public void CheckVariableIsNull_VariableValueIsNull_ReturnException() { var variable = new Variable() { Type = typeof(string), Value = string.Empty }; variableController.Variables.TryAdd("test", variable); VariableSteps steps = new VariableSteps(variableController); Action act = () => steps.CheckVariableIsNull("test"); act.Should().Throw <Exception>() .WithMessage($"Expected value to be <null> because значение переменной \"test\" не является NULL, but found \"\"."); }
public void CheckVariableIsNull_VariableValueIsNull_ReturnException() { var variable = new Variable() { Type = typeof(string), Value = string.Empty }; variableController.Variables.TryAdd("test", variable); VariableSteps steps = new VariableSteps(variableController); Action act = () => steps.CheckVariableIsNull("test"); act.Should().Throw <Exception>() .Which.Message.Contains($"Значение переменной \"test\" не является NULL"); }