public void Ctor_should_set_Pattern_property_if_pattern_parameter_has_a_correct_value() { var pattern = "mypattern"; var constraint = new NotEqualConstraint(pattern); Assert.AreEqual <string>(pattern, constraint.Pattern); }
public static IEnumerable <Constraint> GetAllDiffConstraints(IList <Variable> vars) { var toReturn = new List <Constraint>(); for (int i = 0; i < vars.Count; i++) { for (int j = i + 1; j < vars.Count; j++) { var diffContraint = new NotEqualConstraint(vars[i], vars[j]); toReturn.Add(diffContraint); } } return(toReturn); }