mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-20 01:25:41 -05:00
Feature/batch line info (#56)
* inital pipe of line numbers and getting text from workspace services * tests compile * Fixed bug regarding tests using connections on mac * updated tests * fixed workspace service and fixed tests * integrated feedback
This commit is contained in:
@@ -56,7 +56,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
/// Gets or sets a string containing the full contents of the file.
|
||||
/// Setter for testing purposes only
|
||||
/// </summary>
|
||||
public string Contents
|
||||
public virtual string Contents
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -109,7 +109,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
/// <summary>
|
||||
/// Add a default constructor for testing
|
||||
/// </summary>
|
||||
internal ScriptFile()
|
||||
public ScriptFile()
|
||||
{
|
||||
ClientFilePath = "test.sql";
|
||||
}
|
||||
@@ -171,11 +171,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Workspace.Contracts
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a range of lines from the file's contents.
|
||||
/// Gets a range of lines from the file's contents. Virtual method to allow for
|
||||
/// mocking.
|
||||
/// </summary>
|
||||
/// <param name="bufferRange">The buffer range from which lines will be extracted.</param>
|
||||
/// <returns>An array of strings from the specified range of the file.</returns>
|
||||
public string[] GetLinesInRange(BufferRange bufferRange)
|
||||
public virtual string[] GetLinesInRange(BufferRange bufferRange)
|
||||
{
|
||||
this.ValidatePosition(bufferRange.Start);
|
||||
this.ValidatePosition(bufferRange.End);
|
||||
|
||||
Reference in New Issue
Block a user