public void CompareWithOutParameterWhenNotEqual() { var differences = new List <Difference> { new Difference("", "1", "2") }; _comparer.CalculateDifferences(1, 2).Returns(differences); var result = _comparer.Compare(1, 2, out var outDifferences); Assert.IsFalse(result); _comparer.Received().CalculateDifferences(1, 2); Assert.AreEqual(differences, outDifferences); }
public void CompareWithOutParameterWhenNotEqual() { var differences = new List <Difference> { new Difference("", "string1", "string2") }; _comparer.CalculateDifferences(typeof(string), "string1", "string2").Returns(differences); IEnumerable <Difference> outDifferences; var result = _comparer.Compare("string1", "string2", out outDifferences); Assert.IsFalse(result); _comparer.Received().CalculateDifferences(typeof(string), "string1", "string2"); Assert.AreEqual(differences, outDifferences); }