The environment is Visual Studio Community 2022, now I can add test by right click the method and select the Create Unit Tests
But there is no shortcut for it is possiable to set shortcut for this?
CodePudding user response:
In Visual Studio Community 2022,select Tools > Options > Environment > Keyboard, search EditorContextMenus.CodeWindow.CreateUnitTests then set shortcut and assign (for me I use Ctrl T, Ctrl T)
After that you will get it like below