-
Notifications
You must be signed in to change notification settings - Fork 16
/
ResharperLiveTemplates.xml
206 lines (206 loc) · 13.5 KB
/
ResharperLiveTemplates.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<TemplatesExport>
<Template uid="eb95ea39-f299-43b1-a802-4ba762cabbee" text="using NUnit.Framework;

namespace $NAMESPACE$
{
 [TestFixture]
 public class $CLASS$Tester
 {
 $END$
 }
}" shortcut="fixture" description="NUnit Test Fixture" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" />
<Variable name="CLASS" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="7bd75a75-3ca6-4f6f-ad48-439219fc5b26" text="[Test]
public void $TEST_NAME$() 
{
 $END$
}" shortcut="test" description="NUnit Test" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="TEST_NAME" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="af9d250a-bd36-4d5b-95fc-e448c5c1b15a" text="[SetUp]
public void SetUp()
{
 $END$
}" shortcut="setup" description="NUnit Setup Method" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables />
<CustomProperties />
</Template>
<Template uid="3a71076c-7b3c-4c9f-9378-576e36071b89" text="namespace $NAMESPACE$
{
 public class $CLASS$
 {
 $END$
 }
}" shortcut="class" description=".NET Class" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" />
<Variable name="CLASS" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="46512076-e5cd-4607-99c6-69a88ec43a7b" text="namespace $NAMESPACE$
{
 public interface I$INTERFACE$
 {
 $END$
 }
}" shortcut="interface" description=".NET Interface" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" />
<Variable name="INTERFACE" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="9feab6c5-c4b4-4dee-b789-c15db807a8b6" text="[StructureMap.PluginFamily(Hubbuzz.Domain.ServiceKeys.Default)]" shortcut="family" description="StructureMap Plugin Family" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables />
<CustomProperties />
</Template>
<Template uid="6006f89a-90a6-45ed-8e89-df00d714c147" text="[StructureMap.Pluggable(Hubbuzz.Domain.ServiceKeys.Default)]" shortcut="plugin" description="StructureMap Plugin" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables />
<CustomProperties />
</Template>
<Template uid="480cff5e-44a4-41d9-aba3-ae896e8adfa4" text="MockRepository mocks = new MockRepository();
I$INTERFACE$ $MOCK$ = mocks.CreateMock<I$INTERFACE$>();
 
using(mocks.Record())
{
$END$;
}

using (mocks.Playback())
{
}" shortcut="mocks" description="New RhinoMock repository" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="INTERFACE" expression="" initialRange="0" />
<Variable name="MOCK" expression="suggestVariableName()" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="e0786edb-6b82-461e-81ad-5a199d3e2051" text="I$INTERFACE$ $VARIABLE$ = mocks.CreateMock<I$INTERFACE$>();" shortcut="newmock" description="New RhinoMock mock" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="INTERFACE" expression="" initialRange="0" />
<Variable name="VARIABLE" expression="suggestVariableName()" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="41fe55db-89e0-469b-888f-8aba4123a1ba" text="Assert.AreEqual(null, $VARIABLE$.$PROPERTY$);
$VARIABLE$.$PROPERTY$ = "$PROPERTY$";
Assert.AreEqual("$PROPERTY$", $VARIABLE$.$PROPERTY$);
" shortcut="strprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="fca79122-2880-47f9-b368-1f27c176375a" text="Assert.AreEqual(0, $VARIABLE$.$PROPERTY$);
$VARIABLE$.$PROPERTY$ = 5;
Assert.AreEqual(5, $VARIABLE$.$PROPERTY$);" shortcut="intprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="4b105bc2-f419-47c2-bb04-356617dac448" text="Assert.AreEqual(null, $VARIABLE$.$PROPERTY$);
$CLASS$ $INSTANCE$ = new $CLASS$($END$);
$VARIABLE$.$PROPERTY$ = $INSTANCE$;
Assert.AreSame($INSTANCE$, $VARIABLE$.$PROPERTY$);" shortcut="objprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
<Variable name="CLASS" expression="" initialRange="0" />
<Variable name="INSTANCE" expression="suggestVariableName()" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="c7c3a3a4-a134-440b-9f68-243768a49dc4" text="Assert.AreEqual(0, $VARIABLE$.$PROPERTY$);
$VARIABLE$.$PROPERTY$ = 5.5M;
Assert.AreEqual(5.5M, $VARIABLE$.$PROPERTY$);" shortcut="decprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="3e097099-faeb-411e-8fcf-e7d3de5a37f6" text="Assert.AreEqual(null, $VARIABLE$.$PROPERTY$);
$VARIABLE$.$PROPERTY$ = $ENUMERATION$.$FINAL$;
Assert.AreSame($ENUMERATION$.$FINAL$, $VARIABLE$.$PROPERTY$);" shortcut="enumprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
<Variable name="ENUMERATION" expression="" initialRange="0" />
<Variable name="FINAL" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="2f7e718d-0ae4-4fac-be2c-bba371d71ce2" text="Assert.AreEqual(Guid.Empty, $VARIABLE$.$PROPERTY$);
Guid id = Guid.NewGuid();
$VARIABLE$.$PROPERTY$ = id;
Assert.AreEqual(id, $VARIABLE$.$PROPERTY$);" shortcut="guidprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="2d972b91-2559-41b0-911d-904e0c9ecb53" text="[PluginFamily(ServiceKeys.Default)]
" shortcut="pluginfamily" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables />
<CustomProperties />
</Template>
<Template uid="3a2a018b-8009-4a2a-9a73-1456e44a81b2" text="[Pluggable(ServiceKeys.Default)]" shortcut="pluggable" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables />
<CustomProperties />
</Template>
<Template uid="b04944de-1c75-493c-a4a5-7bdd2948bb96" text="using StructureMap;

namespace $NAMESPACE$
{
 [PluginFamily(ServiceKeys.Default)]
 public interface I$INTERFACE$
 {
 $END$
 }
}" shortcut="iservice" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" />
<Variable name="INTERFACE" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="f8de21f6-614f-47fa-8f6b-2ce282104922" text="using StructureMap;

namespace $NAMESPACE$
{
 [Pluggable(ServiceKeys.Default)]
 public class $CLASS$ : I$CLASS$
 {
 $END$
 }
}" shortcut="service" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" />
<Variable name="CLASS" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="4c331017-eb7c-4058-9c7f-b1433613d1b9" text="I$INTERFACE$ $VARIABLE$ = ObjectFactory.GetInstance<I$INTERFACE$>();" shortcut="newobj" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="INTERFACE" expression="" initialRange="0" />
<Variable name="VARIABLE" expression="suggestVariableName()" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="8663d7b1-43d4-4a36-82a2-506d10e4b4f1" text="Assert.AreEqual(DateTime.MinValue, $VARIABLE$.$PROPERTY$);
$VARIABLE$.$PROPERTY$ = new DateTime(2007, 4, 15);
Assert.AreEqual(new DateTime(2007, 4, 15), $VARIABLE$.$PROPERTY$);
" shortcut="dateprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="5ca7252d-2512-48c1-ac71-7c95bb7b2b33" text="Assert.AreEqual(false, $VARIABLE$.$PROPERTY$);
$VARIABLE$.$PROPERTY$ = true;
Assert.AreEqual(true, $VARIABLE$.$PROPERTY$);" shortcut="boolprop" description="Boolean property" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="31012a06-db34-4c8e-a90f-9ca31b05ad82" text="I$CLASS$ $VARIABLE$ = new $CLASS$();" shortcut="newinst" description="New service instance" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="CLASS" expression="" initialRange="0" />
<Variable name="VARIABLE" expression="suggestVariableName()" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="9499f8a7-3baa-4815-94a1-de118e76b540" text="Expect.Call($METHOD_CALL$).Return($END$);" shortcut="expect" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="METHOD_CALL" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="b9d8e539-7a41-4284-92f7-506fd70b2c46" text="namespace $NAMESPACE$
{
 public class $ENUMERATION$ : Enumeration
 {
 $END$

 public $ENUMERATION$()
 {
 }

 public $ENUMERATION$(int value, string displayName) : base(value, displayName)
 {
 }
 }
}" shortcut="newenum" description="New rich enumeration" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="0" />
<Variable name="ENUMERATION" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="716ce7d1-119e-4370-85aa-adfd2acef14f" text="public static readonly $ENUMERATION$ $NAME$ = new $ENUMERATION$($VALUE$, "$NAME$");" shortcut="newvalue" description="New enumeration member" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="ENUMERATION" expression="" initialRange="0" />
<Variable name="NAME" expression="" initialRange="0" />
<Variable name="VALUE" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
<Template uid="53b61c76-eb27-4d11-a9d7-b0f2cfc5f132" text="Assert.AreEqual(0, $VARIABLE$.$PROPERTY$);
$VARIABLE$.$PROPERTY$ = 5.5;
Assert.AreEqual(5.5M, $VARIABLE$.$PROPERTY$);" shortcut="dblprop" description="" reformat="true" shortenQualifiedReferences="true">
<Categories />
<Variables>
<Variable name="VARIABLE" expression="" initialRange="0" />
<Variable name="PROPERTY" expression="" initialRange="0" />
</Variables>
<CustomProperties />
</Template>
</TemplatesExport>