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:
Anthony Dresser
2016-09-22 17:58:45 -07:00
committed by GitHub
parent 93a75f1ff4
commit f22c8a7283
16 changed files with 321 additions and 93 deletions

View File

@@ -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);