Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }