protected void TestSourcesMatch(IConstraint original, IConstraint exported) { var origSources = new List <ConstraintSource>(); original.GetSources(origSources); var expSources = new List <ConstraintSource>(); exported.GetSources(expSources); Assert.That(expSources.Count, Is.EqualTo(origSources.Count)); for (int i = 0; i < origSources.Count; i++) { var origSource = origSources[i]; var expSource = expSources[i]; Assert.That(expSource.sourceTransform, Is.EqualTo(origSource.sourceTransform)); Assert.That(expSource.weight, Is.EqualTo(origSource.weight)); } }