Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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("", " "));
 }
Ejemplo n.º 3
0
 private void AddField(string heading, PropertyDiff propertyDiff)
 {
     _fields.Add(new Field(heading, propertyDiff.IsDiscrepant, propertyDiff.AlignedLeftValue, propertyDiff.AlignedRightValue, propertyDiff.DiffMask));
 }
Ejemplo n.º 4
0
        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));
		}