The point of snippets is to avoid repetitive typing and if you are currently creating unit tests, aren't you tired of writing arrange,act and assert ?
If you are like me, then the answer is Yes. And not only that but there are other areas that we can use to improve our coding experience. So take this as an introductory example to snippets, and lets create our unit test one.
What we wan to achieve is that after a couple of keystrokes we get this:
And the focus on the WhatAreAreTesting part of the function name so we can change it then one TAB press for ExpectedResult and then a final ENTER to get us to the arrange line so we can start coding.
A code snippet is just an XML file with an especific structure, you can create it in any text editor you want, in this case I will use Visual Sutio Code .
So lets open any Folder on VS Code:
then Add a new XML File: