private PropertyDiff CreatePropertyDiff(PatientProfileDiscrepancy discrepancy, IList <DiscrepancyTestResult> results) { var result = CollectionUtils.SelectFirst <DiscrepancyTestResult>(results, r => r.Discrepancy == discrepancy); if (result != null) { var propDiff = new PropertyDiff(); propDiff.IsDiscrepant = result.IsDiscrepant; propDiff.AlignedLeftValue = result.Diff.AlignedLeft; propDiff.AlignedRightValue = result.Diff.AlignedRight; propDiff.DiffMask = result.Diff.DiffMask; return(propDiff); } return(null); }
public void PropertyDiff(string x, string y, string expected) { var diff = new PropertyDiff(typeof(WithSimpleProperties).GetProperty(nameof(WithSimpleProperties.StringValue)), x, y); Assert.AreEqual(expected, diff.ToString("", " ")); }
private void AddField(string heading, PropertyDiff propertyDiff) { _fields.Add(new Field(heading, propertyDiff.IsDiscrepant, propertyDiff.AlignedLeftValue, propertyDiff.AlignedRightValue, propertyDiff.DiffMask)); }
public void PropertyDiff(string x, string y, string expected) { var diff = new PropertyDiff(typeof(WithSimpleProperties).GetProperty(nameof(WithSimpleProperties.StringValue)), x, y); Assert.AreEqual(expected, diff.ToString("", " ")); }
private void AddField(string heading, PropertyDiff propertyDiff) { _fields.Add(new Field(heading, propertyDiff.IsDiscrepant, propertyDiff.AlignedLeftValue, propertyDiff.AlignedRightValue, propertyDiff.DiffMask)); }