This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grammar+Tests: Allow Empty Input to generate Queries without conditions.
- Loading branch information
1 parent
4d455c4
commit 932b457
Showing
11 changed files
with
277 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using SQE.SQLGenerators; | ||
|
||
namespace SQE.CSharp.UnitTests | ||
{ | ||
[TestClass] | ||
public class MSSQLGeneratorTests | ||
{ | ||
[TestMethod] | ||
public void Test_MSSQLGen_Empty() | ||
{ | ||
var sqlCommand = SQE.GenerateCommand(new MSSQLGenerator("slg.lgs"), string.Empty); | ||
Assert.IsNotNull(sqlCommand); | ||
Assert.AreEqual("SELECT * FROM slg.lgs", sqlCommand.CommandText); | ||
} | ||
|
||
[TestMethod] | ||
public void Test_MSSQLGen_Empty_Only_Spaces() | ||
{ | ||
var sqlCommand = SQE.GenerateCommand(new MSSQLGenerator("slg.lgs"), " "); | ||
Assert.IsNotNull(sqlCommand); | ||
Assert.AreEqual("SELECT * FROM slg.lgs", sqlCommand.CommandText); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,4 @@ WHITESPACE=9 | |
NEWLINE=10 | ||
'('=1 | ||
')'=2 | ||
'and'=3 | ||
'or'=4 | ||
' '=9 |
Oops, something went wrong.