public void CreateApiResultWithArrayShouldSucceed() { const int expected = 10; var dict = CreateTestDictionary(); var apiResult = ApiResultHelper.CreateApiResult(dict); var actual = apiResult.ResultList.Count; Assert.AreEqual(expected, actual); var i = 1; foreach (var apiResultElement in apiResult.ResultList.SelectMany(apiResultList => apiResultList.ApiResultElements)) { StringAssert.IsMatch("key" + i, apiResultElement.Key); StringAssert.IsMatch("value" + i, apiResultElement.Value); i++; } }