Skip to content

Commit

Permalink
Fixed small apparent typo causing invalid SQL in test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-dunwiddie committed May 14, 2020
1 parent 6e6cbca commit c2dc132
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TSQL_Parser/Tests/Statements/MergeStatementTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ FROM myCTE
WHEN MATCHED AND (
NULLIF([Source].[cteColumn2], [Target].[Val]) IS NOT NULL OR NULLIF([Target].[Val], [Source].[cteColumn2]) IS NOT NULL) THEN
UPDATE SET
[Target].[Val] = [Source].[cteColumn2],
[Target].[Val] = [Source].[cteColumn2]
WHEN NOT MATCHED BY TARGET THEN
INSERT([ID],[Val])
VALUES([Source].[cteColumn1],[Source].[cteColumn2])
Expand All @@ -135,7 +135,7 @@ WHEN NOT MATCHED BY SOURCE THEN
Assert.IsNotNull(statements);
Assert.AreEqual(1, statements.Count);
Assert.AreEqual(TSQLStatementType.Merge, statements[0].Type);
Assert.AreEqual(220, merge.Tokens.Count);
Assert.AreEqual(219, merge.Tokens.Count);
Assert.AreEqual(TSQLKeywords.WITH, merge.Tokens[0].AsKeyword.Keyword);
Assert.AreEqual(TSQLKeywords.MERGE, merge.Tokens[38].AsKeyword.Keyword);
Assert.AreEqual(" ", merge.Tokens[39].AsWhitespace.Text);
Expand All @@ -148,7 +148,7 @@ WHEN NOT MATCHED BY SOURCE THEN
Assert.AreEqual(21, merge.Using.Tokens.Count);
Assert.AreEqual(14, merge.On.Tokens.Count);
Assert.AreEqual(3, merge.When.Count);
Assert.AreEqual(64, merge.When[0].Tokens.Count);
Assert.AreEqual(63, merge.When[0].Tokens.Count);
Assert.AreEqual(30, merge.When[1].Tokens.Count);
Assert.AreEqual(14, merge.When[2].Tokens.Count);
Assert.AreEqual(27, merge.Output.Tokens.Count);
Expand Down

0 comments on commit c2dc132

Please sign in to comment.