public static PactDslJsonBody arrayMinLike ( int minSize , int numberExamples ) { if ( numberExamples < minSize ) { throw new IllegalArgumentException ( String . format ( "Number of example %d is less than the minimum size of %d" , numberExamples , minSize ) ) ; } PactDslJsonArray parent = new PactDslJsonArray ( "" , "" , null , true ) ; parent . setNumberExamples ( numberExamples ) ; parent . matchers . addRule ( "" , parent . matchMin ( minSize ) ) ; return new PactDslJsonBody ( "." , "" , parent ) ; }
Array with a minimum size where each item must match the following example