public void Clone_AnySubstitution_ClonedSubstitution(string s) { var sub = new Substitution(s); var clone = sub.Clone(); Assert.That(!ReferenceEquals(sub, clone)); Assert.That(sub.Equals(clone)); }
public void Substitution_ValidVariableAndValidValue_NewSubstitution(string var, string val) { var sub = new Substitution(var, val); Assert.That(sub.Variable.ToString() == var); Assert.That(sub.Value.ToString() == val); var sub2 = new Substitution(Name.BuildName(var), Name.BuildName(val)); Assert.That(sub2.Equals(sub)); }