Skip to content

Commit 6f1fda7

Browse files
committed
TestHelper IsArrayOfJObject method refactored
1 parent 7209558 commit 6f1fda7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

APIMatic.Core/Utilities/TestHelper.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -508,16 +508,7 @@ private static bool ListContainsJObject(JArray jArray)
508508

509509
private static bool IsArrayOfJObject(JArray jArray)
510510
{
511-
bool listOfJObject = true;
512-
foreach (var item in jArray)
513-
{
514-
if (!(item is JObject))
515-
{
516-
listOfJObject = false;
517-
break;
518-
}
519-
}
520-
return listOfJObject;
511+
return jArray.All(item => item is JObject);
521512
}
522513
}
523514
}

0 commit comments

Comments
 (0)