<PackageReference Include="NUnit" Version="4.1.0" />

EachItemConstraintResult

Provides a ConstraintResult for the constraints that are applied to each item in the collection
using System.Runtime.CompilerServices; namespace NUnit.Framework.Constraints { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] internal sealed class EachItemConstraintResult : ConstraintResult { private readonly object _nonMatchingItem; private readonly int _nonMatchingItemIndex; public EachItemConstraintResult(IConstraint constraint, [System.Runtime.CompilerServices.Nullable(2)] object actualValue, object nonMatchingItem, int nonMatchingIndex) : base(constraint, actualValue, false) { _nonMatchingItem = nonMatchingItem; _nonMatchingItemIndex = nonMatchingIndex; } public override void WriteAdditionalLinesTo(MessageWriter writer) { string value = $"""{_nonMatchingItemIndex}""" + MsgUtils.FormatValue(_nonMatchingItem); writer.WriteLine(value); } } }