src/Kingdom.OrTools.Sat.Parameters.Tests/ParameterTestFixtureBase.cs
// ReSharper disable PossibleMultipleEnumeration
/// <summary>
/// Verifies the <paramref name="parameter"/> in the <paramref name="expectedValues"/>
/// and <paramref name="itemType"/> and that it <paramref name="rendered"/> correctly.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="parameter"></param>
/// <param name="expectedValues"></param>
/// <param name="itemType"></param>
/// <param name="rendered"></param>
Verifies the  in the
and  and that it  correctly.
Verifies the in the and and that it correctly .
private static void VerifyRepeatedParameter<T>(IRepeatedParameter<T> parameter, IEnumerable<T> expectedValues, Type itemType, string rendered)
            => parameter.AssertNotNull()
                .AssertEqual(itemType.AssertNotNull(), x => x.ItemType)
                .AssertEqual(rendered.AssertNotNull().AssertNotEmpty(), x => x.ToString())
                .AssertEqual(expectedValues.Count(), x => x.Value.Count)
                .Value.Zip(expectedValues, (x, y) => new {X = x, Y = y})
                .ToList().ForEach(zipped => zipped.X.AssertEqual(zipped.Y));
private static void VerifyRepeatedParameter < T > ( IRepeatedParameter < T > parameter , IEnumerable < T > expectedValues , Type itemType , string rendered ) => parameter . AssertNotNull ( ) . AssertEqual ( itemType . AssertNotNull ( ) , x => x . ItemType ) . AssertEqual ( rendered . AssertNotNull ( ) . AssertNotEmpty ( ) , x => x . ToString ( ) ) . AssertEqual ( expectedValues . Count ( ) , x => x . Value . Count ) . Value . Zip ( expectedValues , ( x , y ) => new { X = x , Y = y } ) . ToList ( ) . ForEach ( zipped => zipped . X . AssertEqual ( zipped . Y ) ) ;
Verifies the  in the
and  and that it  correctly.
Verifies the in the and and that it correctly .
parameter
IRepeatedParameter<T>
None
expectedValues
IEnumerable<T>
None
itemType
Type
None
rendered
string
None
typeparam
None