-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFact - Model - Decimal.snippet
70 lines (65 loc) · 1.95 KB
/
Fact - Model - Decimal.snippet
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
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Fact - Model - Decimal</Title>
<Author>
</Author>
<Description>
</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>fmdec</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal Editable="true">
<ID>expected</ID>
<ToolTip>the expected value</ToolTip>
<Default>1.23m</Default>
<Function>
</Function>
</Literal>
<Literal Editable="true">
<ID>propertyName</ID>
<ToolTip>the name of the property under test</ToolTip>
<Default>PropertyName</Default>
<Function>
</Function>
</Literal>
<Literal Editable="true">
<ID>className</ID>
<ToolTip>the name of the class under test</ToolTip>
<Default>ClassName</Default>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="csharp" Delimiter="$"><![CDATA[[Fact]
public void GoodModel_HasExpectedValue() {
// arrange
var model = MakeModel();
var expected = $expected$;
// act
// assert
model.$propertyName$
.Should()
.Be(expected);
}
[Fact]
public void InitializeModel_HasDefaultValue() {
// arrange
var model = new $className$();
var expected = default(decimal);
// act
// assert
model.$propertyName$
.Should()
.Be(expected);
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>