From 79b8d672b7069649209148c4e7b0374ef11df8b6 Mon Sep 17 00:00:00 2001 From: xiaolei li <85657333+xleili@users.noreply.github.com> Date: Tue, 12 Apr 2022 17:36:16 +0800 Subject: [PATCH] [test]: (#11375) --- .../C#/src/test/FunctionTest/FetchLength.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/connector/C#/src/test/FunctionTest/FetchLength.cs b/src/connector/C#/src/test/FunctionTest/FetchLength.cs index 928e1dfa92..b33377d492 100644 --- a/src/connector/C#/src/test/FunctionTest/FetchLength.cs +++ b/src/connector/C#/src/test/FunctionTest/FetchLength.cs @@ -47,13 +47,24 @@ namespace Cases ResultSet actualResult = new ResultSet(resPtr); List actualData = actualResult.GetResultData(); List actualMeta = actualResult.GetResultMeta(); - expectData.Reverse(); + + // Make expected data and retrieved data in same order + expectData.Sort(); + actualData.Sort(); - Assert.Equal(expectData[0], actualData[0]); + // Assert meta data Assert.Equal(expectMeta[1].name, actualMeta[0].name); Assert.Equal(expectMeta[1].size, actualMeta[0].size); Assert.Equal(expectMeta[1].type, actualMeta[0].type); + // Assert retrieved data + for (int i = 0; i < actualData.Count; i++) + { + // Console.WriteLine($"expectData[{i}]:{expectData[i]},, actualData[{i}]:{actualData[i]}" ); + Assert.Equal(expectData[i].ToString(), actualData[i]); + } + } } -} +} + -- GitLab