mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-26 17:24:21 -05:00
Add tests for the language service diagnostics
This commit is contained in:
@@ -106,6 +106,13 @@ namespace Microsoft.SqlTools.EditorServices
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Add a default constructor for testing
|
||||
/// </summary>
|
||||
public ScriptFile()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new ScriptFile instance by reading file contents from
|
||||
/// the given TextReader.
|
||||
@@ -433,11 +440,11 @@ namespace Microsoft.SqlTools.EditorServices
|
||||
return new BufferRange(startPosition, endPosition);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void SetFileContents(string fileContents)
|
||||
/// <summary>
|
||||
/// Set the script files contents
|
||||
/// </summary>
|
||||
/// <param name="fileContents"></param>
|
||||
public void SetFileContents(string fileContents)
|
||||
{
|
||||
// Split the file contents into lines and trim
|
||||
// any carriage returns from the strings.
|
||||
@@ -451,6 +458,10 @@ namespace Microsoft.SqlTools.EditorServices
|
||||
this.ParseFileContents();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the current file contents to get the AST, tokens,
|
||||
/// and parse errors.
|
||||
|
||||
Reference in New Issue
Block a user