Commit Graph

24 Commits

Author SHA1 Message Date
Aditya Bist
05702182ab Task/script refactor (#476)
* 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

* fixed failing scripting tests
2017-10-03 14:41:18 -07:00
Aditya Bist
e7756b0bf1 Task/script refactor (#446)
* 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
2017-10-02 12:02:43 -07:00
Leila Lali
39dedd88e0 generic way to support scriptable operations (#438)
* implemented a generic way to support scriptable operations
2017-08-18 16:12:00 -07:00
Leila Lali
c28a97e6fa Fix/integrationtests (#391)
* fixed the problem with parsing sql2017 version
2017-06-22 09:20:58 -07:00
Kevin Cunnane
869cd1439f Add LanguageFlavorNotification handling and refactor LanguageService (#375)
* 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
2017-06-12 13:28:24 -07:00
Karl Burtram
dc3cd9ea59 Create DB work in-progress (#350)
* Stage changes to other machine

* Stage changes

* Update SMO to fix SMO missing Login bug on macOS
2017-05-15 18:48:04 -07:00
Leila Lali
0b39408eae added handler for oe refresh and close session requests (#332)
* added handler for oe refresh and close session requests
2017-05-01 15:20:02 -07:00
Aditya Bist
c4227c2e24 fix peek definition integration tests (#330)
* removed race condition in peek definition test

* temporarily disabled peek definition tests

* fixed peek definition connection race condition

* commented out flaky test

* reenabled peek definition tests by removing race condition
2017-04-26 15:50:00 -07:00
Aditya Bist
850cf8c3e4 Bug/fix peek definition integration test (#324)
* removed race condition in peek definition test

* temporarily disabled peek definition tests

* fixed peek definition connection race condition

* commented out flaky test
2017-04-19 14:59:58 -07:00
Aditya Bist
6daadcf8cc Bug/fix peek definition integration test (#313)
* removed race condition in peek definition test

* temporarily disabled peek definition tests

* fixed peek definition connection race condition
2017-04-13 16:03:44 -07:00
Aditya Bist
1a384d93b4 Bug/fix peek definition integration test (#306)
* removed race condition in peek definition test

* temporarily disabled peek definition tests
2017-04-05 16:03:58 -07:00
Aditya Bist
f9138b27df removed race condition in peek definition test (#305) 2017-04-04 17:57:37 -07:00
Aditya Bist
9e8e1df95e fixed peek definition tokenizing (#281)
* fixed peek definition tokenizing

* fixed signature help test

* added new heuristic for PeekDefinition behaviour

* added tests for new heuristic

* fixed code according to Kevin's CR

* fixed failing test due to shared connection

* changed uri for procedure test
2017-03-23 13:19:59 -07:00
Karl Burtram
addad29b7c Add Scripter class and use it in the ScriptingService (#286)
* 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
2017-03-21 13:18:52 -07:00
Benjamin Russell
1166778249 Isolate Shared Test Code (#252)
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
2017-03-02 13:00:31 -08:00
Sharon Ravindran
9cc9a76ba8 Fix peek definition test (#242)
* Fix UpdateLanguageService in test

* Use separate language service instance

* Remoce commented code

* Refactor test

* Fix typo
2017-02-17 17:59:27 -08:00
Karl Burtram
5d0c187684 Clear and rebuild IntelliSense cache (#238)
* Stage changes to other machine

* IntelliSense cache rebuild command

* Move to other machine

* Add a test for overwriting binding queue.

* Move event handler into lanaguageservice.cs
2017-02-16 12:23:26 -08:00
Sharon Ravindran
b10d6bdfdc Check database case sensitivity for peek definition token matching (#227)
* Check database case sensitivity before peek definition token matching

* Add sr gen

* add tests for ignore case

* remove sr.Designer
2017-02-08 12:34:01 -08:00
Sharon Ravindran
50195faced Fix to get the current database context for peek definition (#220)
* Get db name from query connection

* Add comments

* Correct typos

* revert changes to .sln

* Add unit tests

* Fix typo

* Fix error due to a mistyped comment
2017-02-03 17:50:55 -08:00
Leila Lali
41d38b2107 fixed the problem in peekdefinition tests 2017-01-25 17:09:10 -08:00
Leila Lali
dcff5dd915 New tool to store SQL connection configs locally (#218)
* added a new tool to store SQL connections locally. Modified the peek definition tests to create test database before running test


* fixed failing test QueryExecutionPlanInvalidParamsTest

* Fixes based on code review comments

* fixed failing test GetSignatureHelpReturnsNotNullIfParseInfoInitialized
2017-01-25 16:19:27 -08:00
Sharon Ravindran
5464e4e63a Feature/peek def code gen (#215)
* Add codeGen for existing types

* Modify code gen logic to match current code

* Extend logic for new smo objects

* Add logic to retrieve token type from QuickInfo

* Remove duplicate types

* Add tests for new types

* Modify GetScript logic to use suggestions first

* Add more tests

* Modify codeGen to include quickInfo logic

* Cake build changes to run CodeGen

* CodeGen replace indentation

* Refactor GetScript and add more tests

* Refactor Resolver calls

* Fix TestDriver test for Definition

* Change quickInfo string case

* Revert change sto .sln file

* Fix typos in comments

* change String to string

* Rename test sql objects
2017-01-19 13:24:58 -08:00
Leila Lali
b353b2137e New test common project for database connections using the settings.json (#210)
* moved test driver tests and test common classes to separate projects
2017-01-11 13:47:56 -08:00
Connor Quagliana
3ad7cc1a8b Move Integration Tests to dedicated project (#201)
Add IntegrationTests project. Move all tests ifdef'd with LIVE_CONNECTION_TESTS to IntegrationTests project. Delete files that have no remaining code. Update codecoverage.bat to run integration tests
2017-01-04 11:37:57 -08:00