Original link: http://www.dotblogs.com.tw/yc421206/archive/2013/03/08/95920.aspx
Step1. Creating a selection
In VS2012, tools→customize→commands
After you find the Create Unit tests, press move up, and then press Move Down
STEP2. Setting shortcut keys
1. Search the unit key word, if the Chinese version of the input "single-element test"
2. Select EditorContextMenus.CodeWindow.CreateUnitTests
3. Define the shortcut keys to make sure that this key is not used------------Note: To be set to Ctrl+t,ctrl+c!!!!!!!!!! ATTENTION Order!!!
4. Specify
5. Press OK if you have no problem
This time will go back to customize, press close
Step3. Re-activate VS2012
Not surprisingly, the right-click list that you see in the text editor is like this
Press CTRL + C, Ctrl+t will appear
Entering EditorContextMenus.CodeWindow.CreateUnitTests in the command will jump out of command " EditorContextMenus.CodeWindow.CreateUnitTests "is not available.
The poor character is like this, no matter how, will jump out of the ineffective command, as if the command was sealed up ...
To resolve Command "EditorContextMenus.CodeWindow.CreateUnitTests" is not available, you can refer to the following
http://dl.my/2013/create-unit-tests-function-not-available-or-disabled/
or follow the steps below:
Step1. Join a test case
STEP2. New unit test file
STEP3. Call Unit Test List
Then back to the text editor, press the right key, the magic of the event, the original anti-white selection, the seal lifted (HI).
Hello, the single-yuan test has been a long time.
PS. Once you have re-initiated VS, the single-element test will be sealed again, and you can use the Orz when you add a test file.
Though it's a little annoying, it's much easier to think in a different way than to have to do it all by yourself.
Supplemental charge:
Using the ctrl+c,ctrl+t sequence may make it impossible to use the complex shortcut, suggesting the use of ctrl+t,ctrl+c
If there is a absurdity, please inform the Novice, please forgive
[Go] [Visual Studio 2012] get back to building a unit test list