Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding some handy snippets I use with Machine.Specifications and Mach…

…ine.Fakes.
  • Loading branch information...
commit 9c61dcb702d80e703fbe881a3969209ac081c81c 1 parent efc87de
Nathan Bridgewater authored
41 snippets/spec.snippet
View
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>spec</Title>
+ <Shortcut>spec</Shortcut>
+ <Description>Code snippet for stubbing in a simple Machine.Specifications test</Description>
+ <Author>Nathan Bridgewater</Author>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>subjectText</ID>
+ <ToolTip>Spec Subject Description</ToolTip>
+ <Default>Category</Default>
+ </Literal>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>Spec name</ToolTip>
+ <Default>When_something_happens_with_constraint</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp">
+ <![CDATA[[Subject("$subjectText$")]
+public class $name$
+{
+ Establish context;
+
+ Because of;
+
+ It Should;
+}
+
+ $end$]]>
+ </Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
46 snippets/specf.snippet
View
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>specf</Title>
+ <Shortcut>specf</Shortcut>
+ <Description>Code snippet for stubbing in a simple Machine.Specifications test using Machine.Fakes WithFakes</Description>
+ <Author>Nathan Bridgewater</Author>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>subjectText</ID>
+ <ToolTip>Spec Subject Description</ToolTip>
+ <Default>Category</Default>
+ </Literal>
+ <Literal>
+ <ID>subject</ID>
+ <ToolTip>Spec Fakes Subject</ToolTip>
+ <Default>SomeImplementationType</Default>
+ </Literal>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>Spec name</ToolTip>
+ <Default>When_something_happens_with_constraint</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp">
+ <![CDATA[[Subject("$subjectText$")]
+public class $name$ : WithFakes
+{
+ Establish context;
+
+ Because of;
+
+ It Should;
+}
+
+ $end$]]>
+ </Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
46 snippets/specs.snippet
View
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>specs</Title>
+ <Shortcut>specs</Shortcut>
+ <Description>Code snippet for stubbing in a simple Machine.Specifications test with Machine.Fakes subject.</Description>
+ <Author>Nathan Bridgewater</Author>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>subjectText</ID>
+ <ToolTip>Spec Subject Description</ToolTip>
+ <Default>Category</Default>
+ </Literal>
+ <Literal>
+ <ID>subject</ID>
+ <ToolTip>Spec Fakes Subject</ToolTip>
+ <Default>SomeImplementationType</Default>
+ </Literal>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>Spec name</ToolTip>
+ <Default>When_something_happens_with_constraint</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp">
+ <![CDATA[[Subject("$subjectText$")]
+public class $name$ : WithSubject<$subject$>
+{
+ Establish context;
+
+ Because of;
+
+ It Should;
+}
+
+ $end$]]>
+ </Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
Please sign in to comment.
Something went wrong with that request. Please try again.