protected override void When() { _binding = new VariableBinding(_variable, _value); }
/// <summary> /// Sets the value of the specified variable /// </summary> /// <param name="variable">The variable for which to set the specified value</param> /// <param name="value">The new value of the specified variable</param> public void SetVariableValue(Variable variable, object value) { Contract.Requires(variable != null); var binding = TryGetBinding(variable); if(binding != null) { binding.Value = value; } else { binding = new VariableBinding(variable, value); _bindingsByVariable[variable] = binding; } }