Skip to content

Commit a18e6a3

Browse files
committed
another order fix
1 parent 75623ec commit a18e6a3

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

Musoq.Evaluator.Tests/JoinTests.cs

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,14 +1010,20 @@ public void MultipleLeftJoinWithCTriesMatchBAndSucceedTest()
10101010
Assert.AreEqual(2, column.ColumnIndex);
10111011
Assert.AreEqual("c.Id", column.ColumnName);
10121012
Assert.AreEqual(typeof(int?), column.ColumnType);
1013+
1014+
Assert.IsTrue(table.Count == 2, "Table should have 2 entries");
10131015

1014-
Assert.AreEqual(1, table[0][0]);
1015-
Assert.AreEqual(1, table[0][1]);
1016-
Assert.AreEqual(1, table[0][2]);
1016+
Assert.IsTrue(table.Any(entry =>
1017+
(int)entry[0] == 1 &&
1018+
(int)entry[1] == 1 &&
1019+
(int)entry[2] == 1
1020+
), "First entry should be 1, 1, 1");
10171021

1018-
Assert.AreEqual(2, table[1][0]);
1019-
Assert.AreEqual((int?)null, table[1][1]);
1020-
Assert.AreEqual((int?)null, table[1][2]);
1022+
Assert.IsTrue(table.Any(entry =>
1023+
(int)entry[0] == 2 &&
1024+
entry[1] == null &&
1025+
entry[2] == null
1026+
), "Second entry should be 2, null, null");
10211027
}
10221028

10231029
[TestMethod]
@@ -1106,14 +1112,20 @@ public void MultipleRightJoinWithCTriesMatchBAndSucceedForASingleTest()
11061112
Assert.AreEqual(2, column.ColumnIndex);
11071113
Assert.AreEqual("c.Id", column.ColumnName);
11081114
Assert.AreEqual(typeof(int), column.ColumnType);
1115+
1116+
Assert.IsTrue(table.Count == 2, "Table should have 2 entries");
11091117

1110-
Assert.AreEqual(1, table[0][0]);
1111-
Assert.AreEqual(1, table[0][1]);
1112-
Assert.AreEqual(1, table[0][2]);
1118+
Assert.IsTrue(table.Any(entry =>
1119+
(int?)entry[0] == 1 &&
1120+
(int?)entry[1] == 1 &&
1121+
(int?)entry[2] == 1
1122+
), "First entry should be 1, 1, 1");
11131123

1114-
Assert.AreEqual((int?)null, table[1][0]);
1115-
Assert.AreEqual((int?)null, table[1][1]);
1116-
Assert.AreEqual(2, table[1][2]);
1124+
Assert.IsTrue(table.Any(entry =>
1125+
entry[0] == null &&
1126+
entry[1] == null &&
1127+
(int?)entry[2] == 2
1128+
), "Second entry should be null, null, 2");
11171129
}
11181130

11191131
[TestMethod]

0 commit comments

Comments
 (0)