Advertisement
Venciity

testmethod.snippet for C#

Sep 1st, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3. <CodeSnippet Format="1.0.0">
  4. <Header>
  5. <SnippetTypes>
  6. <SnippetType>Expansion</SnippetType>
  7. </SnippetTypes>
  8. <Title>Test Method</Title>
  9. <Shortcut>testm</Shortcut>
  10. <Description>Code snippet for a test method</Description>
  11. <Author>Microsoft Corporation</Author>
  12. </Header>
  13. <Snippet>
  14. <Imports>
  15. <Import>
  16. <Namespace>Microsoft.VisualStudio.TestTools.UnitTesting</Namespace>
  17. </Import>
  18. </Imports>
  19. <References>
  20. <Reference>
  21. <Assembly>Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</Assembly>
  22. </Reference>
  23. </References>
  24. <Declarations>
  25. <Literal>
  26. <ID>methodName</ID>
  27. <ToolTip>Replace with the method name part of name of the test method</ToolTip>
  28. <Default>MyTestMethod</Default>
  29. </Literal>
  30. <Literal>
  31. <ID>Condition</ID>
  32. <ToolTip>Replace with the condition part of name of the test method</ToolTip>
  33. <Default>Condition</Default>
  34. </Literal>
  35. <Literal>
  36. <ID>ExpectedResult</ID>
  37. <ToolTip>Replace with the expected result part of name of the test method</ToolTip>
  38. <Default>MyTestMethod</Default>
  39. </Literal>
  40. <Literal Editable="false">
  41. <ID>TestMethod</ID>
  42. <Function>SimpleTypeName(global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod)</Function>
  43. </Literal>
  44. </Declarations>
  45. <Code Language="csharp"><![CDATA[[$TestMethod$]
  46. public void $methodName$_$Condition$_$ExpectedResult$()
  47. {
  48. $end$
  49. }]]></Code>
  50. </Snippet>
  51. </CodeSnippet>
  52. </CodeSnippets>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement