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