Created
September 4, 2018 14:45
-
-
Save ghyston/2fbd3dce3aae588a4f8d47bf34bee9ba to your computer and use it in GitHub Desktop.
Snippet for VS2017 to add mocking object properties faster.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets | |
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Add Mock</Title> | |
<Author>Hyston</Author> | |
<Description>Add mock property.</Description> | |
<Shortcut>mock</Shortcut> | |
</Header> | |
<Snippet> | |
<Imports> | |
<Import> | |
<Namespace>Moq</Namespace> | |
</Import> | |
</Imports> | |
<Declarations> | |
<Literal> | |
<ID>MockedClass</ID> | |
<ToolTip>Replace with a class name, that should be mocked.</ToolTip> | |
<Default>Foo</Default> | |
</Literal> | |
</Declarations> | |
<Code Language="CSharp"> | |
<![CDATA[public Mock<$MockedClass$> $MockedClass$Mock = new Mock<$MockedClass$>();]]> | |
</Code> | |
</Snippet> | |
</CodeSnippet> | |
</CodeSnippets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment