Skip to content

Commit 8fe30e4

Browse files
committed
init
0 parents  commit 8fe30e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2789
-0
lines changed

.gitattributes

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Auto detect text files and perform LF normalization
2+
* text eol=crlf
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain
23+
*.sql diff=astextplain
24+
25+
#Binary
26+
*.dll binary
27+
*.exe binary
28+
*.png binary
29+
*.tif binary
30+
*.tiff binary
31+
*.snk binary
32+
*.ttf binary
33+
*.gif binary
34+
*.bak binary

.gitignore

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
*.received.*
2+
nuget_packages/
3+
4+
bin/
5+
tmp/
6+
*.tmp
7+
*.bak
8+
9+
10+
#################
11+
## Visual Studio
12+
#################
13+
14+
## Ignore Visual Studio temporary files, build results, and
15+
## files generated by popular Visual Studio add-ons.
16+
17+
# User-specific files
18+
*.suo
19+
*.user
20+
*.sln.docstates
21+
# VS2017 SettingsCache
22+
.vs
23+
24+
# Build results
25+
[Dd]ebug/
26+
[Rr]elease/
27+
*_i.c
28+
*_p.c
29+
*.ilk
30+
*.meta
31+
*.obj
32+
*.pch
33+
*.pdb
34+
*.pgc
35+
*.pgd
36+
*.rsp
37+
*.sbr
38+
*.tlb
39+
*.tli
40+
*.tlh
41+
*.tmp
42+
*.vspscc
43+
.builds
44+
*.dotCover
45+
*.nupkg
46+
packages/
47+
48+
49+
# Visual Studio profiler
50+
*.psess
51+
*.vsp
52+
53+
# ReSharper is a .NET coding add-in
54+
_ReSharper*
55+
56+
# Installshield output folder
57+
[Ee]xpress
58+
59+
60+
# Others
61+
[Bb]in
62+
[Oo]bj
63+
sql
64+
TestResults
65+
*.Cache
66+
ClientBin
67+
stylecop.*
68+
~$*
69+
*.dbmdl
70+
71+
############
72+
## Windows
73+
############
74+
75+
# Windows image file caches
76+
Thumbs.db
77+
78+
# Folder config file
79+
Desktop.ini
80+
81+
# Mac crap
82+
.DS_Store
83+
RealTests.playlist
84+
ApprovalTests.Tests/UnixLineEndings.txt
85+
ApprovalTests.Tests/WindowsLineEndings.txt

azure-pipelines.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# .NET Desktop
2+
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
3+
# Add steps that publish symbols, save build artifacts, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
5+
6+
trigger:
7+
- master
8+
9+
pool:
10+
vmImage: 'VS2017-Win2016'
11+
12+
variables:
13+
solution: '**/*.sln'
14+
buildPlatform: 'Any CPU'
15+
buildConfiguration: 'Release'
16+
17+
steps:
18+
- task: NuGetToolInstaller@0
19+
20+
- task: NuGetCommand@2
21+
inputs:
22+
restoreSolution: '$(solution)'
23+
24+
- task: VSBuild@1
25+
inputs:
26+
solution: '$(solution)'
27+
platform: '$(buildPlatform)'
28+
configuration: '$(buildConfiguration)'
29+
30+
- task: VSTest@2
31+
inputs:
32+
platform: '$(buildPlatform)'
33+
configuration: '$(buildConfiguration)'

license.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) Llewellyn Falco. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you
4+
may not use this file except in compliance with the License. You may
5+
obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12+
implied. See the License for the specific language governing permissions
13+
and limitations under the License.

readme.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# <img src="https://avatars3.githubusercontent.com/u/36907" height="30px"> ApprovalTests.StatePrinter
2+
3+
Extends [ApprovalTests](https://github.com/approvals/ApprovalTests.Net) to allow simple approval of complex models using [StatePrinter](https://github.com/kbilsted/StatePrinter).
4+
5+
6+
## The NuGet package [![NuGet Status](http://img.shields.io/nuget/v/ApprovalTests.StatePrinter.svg?style=flat)](https://www.nuget.org/packages/ApprovalTests.StatePrinter/)
7+
8+
https://nuget.org/packages/ApprovalTests.StatePrinter/
9+
10+
PM> Install-Package ApprovalTests.StatePrinter
11+
12+
13+
## Usage
14+
15+
Given a model:
16+
17+
<!-- snippet: model -->
18+
```cs
19+
public class Turtle
20+
{
21+
public string Name { get; set; }
22+
public Turtle On { get; set; }
23+
24+
public Turtle(string name, Turtle onTurtle)
25+
{
26+
Name = name;
27+
On = onTurtle;
28+
}
29+
}
30+
```
31+
<sup>[snippet source](/src/ApprovalTests.StatePrinter.Tests/StatePrinterTests.cs#L21-L34)</sup>
32+
<!-- endsnippet -->
33+
34+
That is verified:
35+
36+
<!-- snippet: usage -->
37+
```cs
38+
public class StatePrinterTests
39+
{
40+
[Fact]
41+
public void TestVerifyCircleReferences()
42+
{
43+
var turtle = new Turtle("jim",
44+
new Turtle("kasper",
45+
new Turtle("llewellyn", null)));
46+
turtle.On.On.On = turtle;
47+
StatePrinterApprovals.Verify(turtle);
48+
}
49+
}
50+
```
51+
<sup>[snippet source](/src/ApprovalTests.StatePrinter.Tests/StatePrinterTests.cs#L4-L19)</sup>
52+
<!-- endsnippet -->
53+
54+
Will result in this as an approved file:
55+
56+
```
57+
Root = new Turtle(), ref: 0
58+
{
59+
Name = "jim"
60+
On = new Turtle()
61+
{
62+
Name = "kasper"
63+
On = new Turtle()
64+
{
65+
Name = "llewellyn"
66+
On = -> 0
67+
}
68+
}
69+
}
70+
```
71+
72+
73+
## Links
74+
75+
* NuGet: https://nuget.org/packages/ApprovalTests.StatePrinter/
76+
* Build: [![Build Status](https://dev.azure.com/approvals/ApprovalTests.Net.StatePrinter/_apis/build/status/approvals.ApprovalTests.Net.StatePrinter?branchName=master)](https://dev.azure.com/approvals/ApprovalTests.Net.StatePrinter/_build/latest?definitionId=1&branchName=master)

readme.source.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# <img src="https://avatars3.githubusercontent.com/u/36907" height="30px"> ApprovalTests.StatePrinter
2+
3+
Extends [ApprovalTests](https://github.com/approvals/ApprovalTests.Net) to allow approval of EntityFramework Queries.
4+
5+
6+
## The NuGet package [![NuGet Status](http://img.shields.io/nuget/v/ApprovalTests.EntityFramework.svg?style=flat)](https://www.nuget.org/packages/ApprovalTests.EntityFramework/)
7+
8+
https://nuget.org/packages/ApprovalTests.EntityFramework/
9+
10+
```ps
11+
PM> Install-Package ApprovalTests.EntityFramework
12+
```
13+
14+
15+
## Usage
16+
17+
Given a model:
18+
19+
snippet: model
20+
21+
That is verified:
22+
23+
snippet: usage
24+
25+
Will result in this as an approved file:
26+
27+
```
28+
Root = new Turtle(), ref: 0
29+
{
30+
Name = "jim"
31+
On = new Turtle()
32+
{
33+
Name = "kasper"
34+
On = new Turtle()
35+
{
36+
Name = "llewellyn"
37+
On = -> 0
38+
}
39+
}
40+
}
41+
```
42+
43+
44+
## Links
45+
46+
* NuGet: https://nuget.org/packages/ApprovalTests.EntityFramework/
47+
* Build: [![Build Status](https://dev.azure.com/approvals/ApprovalTests.Net.EntityFramework/_apis/build/status/approvals.ApprovalTests.Net.StatePrinter?branchName=master)](https://dev.azure.com/approvals/ApprovalTests.Net.StatePrinter/_build/latest?definitionId=1&branchName=master)

src/.editorconfig

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# EditorConfig: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space:error
8+
9+
[*.cs]
10+
indent_size = 4:error
11+
charset = utf-8-bom:error
12+
13+
# Sort using and Import directives with System.* appearing first
14+
dotnet_sort_system_directives_first = true:error
15+
16+
# Avoid "this." and "Me." if not necessary
17+
dotnet_style_qualification_for_field = false:error
18+
dotnet_style_qualification_for_property = false:error
19+
dotnet_style_qualification_for_method = false:error
20+
dotnet_style_qualification_for_event = false:error
21+
22+
# Use language keywords instead of framework type names for type references
23+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
24+
dotnet_style_predefined_type_for_member_access = true:error
25+
26+
# Suggest more modern language features when available
27+
dotnet_style_object_initializer = true:suggestion
28+
dotnet_style_collection_initializer = true:suggestion
29+
dotnet_style_coalesce_expression = false:suggestion
30+
dotnet_style_null_propagation = true:suggestion
31+
dotnet_style_explicit_tuple_names = true:suggestion
32+
33+
# Prefer "var" everywhere
34+
csharp_style_var_for_built_in_types = true:error
35+
csharp_style_var_when_type_is_apparent = true:error
36+
csharp_style_var_elsewhere = true:error
37+
38+
# Prefer method-like constructs to have a block body
39+
csharp_style_expression_bodied_methods = false:none
40+
csharp_style_expression_bodied_constructors = false:none
41+
csharp_style_expression_bodied_operators = false:none
42+
43+
# Prefer property-like constructs to have an expression-body
44+
csharp_style_expression_bodied_properties = true:suggestion
45+
csharp_style_expression_bodied_indexers = true:suggestion
46+
csharp_style_expression_bodied_accessors = true:none
47+
48+
# Suggest more modern language features when available
49+
csharp_style_pattern_matching_over_is_with_cast_check = true:error
50+
csharp_style_pattern_matching_over_as_with_null_check = true:error
51+
csharp_style_inlined_variable_declaration = true:suggestion
52+
csharp_style_throw_expression = true:suggestion
53+
csharp_style_conditional_delegate_call = true:suggestion
54+
55+
# Newline settings
56+
#csharp_new_line_before_open_brace = all:error
57+
csharp_new_line_before_else = true:error
58+
csharp_new_line_before_catch = true:error
59+
csharp_new_line_before_finally = true:error
60+
csharp_new_line_before_members_in_object_initializers = true:error
61+
csharp_new_line_before_members_in_anonymous_types = true:error
62+
63+
#braces
64+
#csharp_prefer_braces = true:error
65+
66+
# msbuild
67+
[*.{csproj,targets,props}]
68+
indent_size = 2
69+
70+
# Xml files
71+
[*.{xml,config,nuspec,resx,vsixmanifest}]
72+
indent_size = 2
73+
resharper_xml_wrap_tags_and_pi = true:error
74+
75+
# JSON files
76+
[*.json]
77+
indent_size = 2

0 commit comments

Comments
 (0)