protected override ComparerResult CompareObjects(object x, object y) { var xThreeState = caster.Execute(x); var yThreeState = caster.Execute(y); if (IsEqual(xThreeState, yThreeState)) { return(ComparerResult.Equality); } return(new ComparerResult(x.ToString())); }
protected override ComparerResult CompareObjects(object x, object y) { var builder = new NumericIntervalBuilder(x); builder.Build(); if (builder.IsValid()) { return(CompareDecimals ( builder.GetInterval() , caster.Execute(y) )); } builder = new NumericIntervalBuilder(y); builder.Build(); if (builder.IsValid()) { return(CompareDecimals ( builder.GetInterval() , caster.Execute(x) )); } return(CompareObjects(x, y, NumericAbsoluteTolerance.None)); }
protected override ComparerResult CompareObjects(object x, object y) { var rxDateTime = caster.Execute(x); var ryDateTime = caster.Execute(y); //Compare DateTimes (without tolerance) if (IsEqual(rxDateTime, ryDateTime)) { return(ComparerResult.Equality); } return(new ComparerResult(rxDateTime.ToString(DateTimeFormatInfo.InvariantInfo))); }