* Remove xunit dependency from testdriver
* swap expected/actual as needed
* Convert Test.Common to nunit
* port hosting unit tests to nunit
* port batchparser integration tests to nunit
* port testdriver.tests to nunit
* fix target to copy dependency
* port servicelayer unittests to nunit
* more unit test fixes
* port integration tests to nunit
* fix test method type
* try using latest windows build for PRs
* reduce test memory use
* Fix tools service to store the corrected file path
* Use ClientFilePath for key
* Further fixes
* Undo spacing changes
* Fix tests
* Trigger CI rebuild
* Adding ICompletionExtension interface
* Adding extension loading and execution logic
* Fixing compilation error in VS 2017
* Using MEF for completion extension discovery
* using await on GetCompletionItems
* Adding an integration test for completion extension and update the completion extension interface
* Update the completion extension test
* Fix issues based on review comments
* Remove try/cache based on review comments, fix a integration test.
* More changes based on review comments
* Fixing SendResult logic for completion extension loading
* Only load completion extension from the assembly passed in, add more comments in the test
* Adding right assert messages in the test.
* More fixes based on review comments
* Dropping ICompletionExtensionProvider, load assembly only if it's loaded at the first time or updated since last load.
* Fix based on the latest review comments
* Adding missing TSQL functions in default completion list
* Update jsonrpc documentation for completion/extLoad
* Fix to make sql exceptions surface properly to user (with important notes!)
* Adding support for detecting column size issues when updating a cell
* Adding unit tests for the exception on read scenario
* Fix https://github.com/Microsoft/vscode-mssql/issues/986 and add better server edition naming
- Fixed a number of issues related to the binding queue, specifically the fact that it didn't capture exceptions that occurred on the binding thread. This caused the thread to crash the service.
- The root cause of the error was when you get a connection error during init of the SmoMetadataProvider which threw an exception. Because of this no Binder was created, and the code would null ref later during processing
- Added logic to handle null ref issue and other related code
- Added a unit test for the new error handling path, and supported still returning some value in this case
- Separately, have a fix for an issue where the edition is shown as "SQL Azure" for all Azure connections. Fixing to be "Azure SQL DB" for this case and handle when the database reports as DW or Stretch instead. This maps better to users concept of what the edition should be and avoids returning what is an outdated term.
* Messed up the test - fixing this by returning the expected return object
* scripting working with race conditions
* new service works with no race conditions
* use new scripting service and commented out tests
* refactored peek definition to use mssql-scripter
* fixed peek definition tests
* removed auto gen comment
* fixed peek definition highlighting bug
* made scripting async and fixed event handlers
* fixed tests (without cancel and plan notifs)
* removed dead code
* added nuget package
* CR comments + select script service implementation
* minor fixes and added test
* CR comments and script select
* added unit tests
* code review comments and cleanup
- Additional handling of document events with "perforce:" or other SCM strings
- Much of the handling had been added already, but adding in additional validation and ensuring that everywhere `Workspace.GetFile` is called we add a not-null check to avoid null reference errors
* LanguageService must send result or intellisense hangs
- Unless the language services methods return results for requests, the VSCode language service protocol will never send a response up to its higher-level code. This means with intellisense off, it appears to hang instead of saying "No results found". This is clearly sub-optimal and if any other extension wants to provide SQL suggestions, it would break them from sending results
- Minor refactor to fully remove Instance-field references in the code
* Add LanguageFlavorNotification handling and refactor LanguageService
- Added new notification handler for language flavor changed
- Refactored the LanguageService so that it no longer relies on so many intertwined static calls, which meant it was impossible to test without modifying the static instance. This will help with test reliability in the future, and prep for replacing the instance with a service provider.
* Skip if not an MSSQL doc and add test
* Handle definition requests
* Fix diagnostics handling
This change ensures that when calling `requestContext.SendError` you are only able to supply parameters that match the language service beta protocol expected Error object. In other words, you have to provide an error message and optionally and error code.
# **BREAKING API CHANGES**
This will break displaying errors in Microsoft/vscode-mssql. I will be making changes to properly handle the error object shortly.
* Adding contract for returning Error objects as per LanguageService "protocol"
* Fixes throughout codebase to send only error message in error cases
Cleanup of CredentialServiceTest unit test class
Adding standard error handling for event flow validator
* Adding optional data field as per protocol spec
https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md
* Adding optional validation for error objects
* Initial scripting commit
* Fix the script CREATE integration test
* Use language service binding queue for scripting
* Update scripting service to have methods for each operation
* Add scripter class
* Fix build break.
* Fix a few bugs
* Use scripter class instead of PeekDefinition class.
* Fix scripting test break
* Fix header incorrectly saying file is generated.
* Add localization tests to address a large block of code not covered by automation.
* Moving system usings to top of using list
The goal of this make sure that test code is correctly organized to ensure that test suites aren't dependent on each other.
* UnitTests get their own project now (renaming Microsoft.SqlTools.ServiceLayer.Test to Microsoft.SqlTools.ServiceLayer.UnitTests) which is about 90% of the changes to the files.
* IntegrationTests no longer depends on UnitTests, only Test.Common
* Any shared components from TestObjects that spins up a "live" connection has been moved to IntegrationTests Utility/LiveConnectionHelper.cs
* The dictionary-based mock file stream factory has been moved to Test.Common since it is used by UnitTests and IntegrationTests
* Added a overload that doesn't take a dictionary for when we don't care about monitoring the storage (about 90% of the time)
* The RunIf* wrapper methods have been moved to Test.Common
* OwnerUri and StandardQuery constants have been moved to Test.Common Constants file
* Updating to latest SDK version available at https://www.microsoft.com/net/core#windowscmd
* Moving unit tests to unit test folder
* Changing namespaces to UnitTests
* Moving some constants and shared functionality into common project, making the UnitTests reference it
* Unit tests are working!
* Integration tests are working
* Updating automated test runs
* Fixing one last broken unit test
* Exposing internals for other projects
* Moving edit data tests to UnitTest project
* Applying refactor fixes to unit tests
* Fixing flaky test that wasn't awaiting completion