This commit is contained in:
Родитель
c474aefce4
Коммит
8b406ee2c3
|
@ -0,0 +1,2 @@
|
|||
github: SimonCropp
|
||||
tidelift: "nuget/Verify"
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
name: Bug fix
|
||||
about: Create a bug fix to help us improve
|
||||
---
|
||||
|
||||
Note: New issues raised, where it is clear the submitter has not read the issue template, are likely to be closed with "please read the issue template". Please don't take offense at this. It is simply a time management decision. If someone raises an issue, and can't be bothered to spend the time to read the issue template, then the project maintainers should not be expected to spend the time to read the submitted issue. Often too much time is spent going back and forth in issue comments asking for information that is outlined in the issue template.
|
||||
|
||||
|
||||
#### Preamble
|
||||
|
||||
General questions may be better placed [StackOveflow](https://stackoverflow.com/).
|
||||
|
||||
Where relevant, ensure you are using the current stable versions on your development stack. For example:
|
||||
|
||||
* Visual Studio
|
||||
* [.NET SDK or .NET Core SDK](https://www.microsoft.com/net/download)
|
||||
* Any related NuGet packages
|
||||
|
||||
Any code or stack traces must be properly formatted with [GitHub markdown](https://guides.github.com/features/mastering-markdown/).
|
||||
|
||||
|
||||
#### Describe the bug
|
||||
|
||||
A clear and concise description of what the bug is. Include any relevant version information.
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
Add any other context about the problem here.
|
||||
|
||||
|
||||
#### Minimal Repro
|
||||
|
||||
Ensure you have replicated the bug in a minimal solution with the fewest moving parts. Often this will help point to the true cause of the problem. Upload this repro as part of the issue, preferably a public GitHub repository or a downloadable zip. The repro will allow the maintainers of this project to smoke test the any fix.
|
||||
|
||||
#### Submit a PR that fixes the bug
|
||||
|
||||
Submit a [Pull Request (PR)](https://help.github.com/articles/about-pull-requests/) that fixes the bug. Include in this PR a test that verifies the fix. If you were not able to fix the bug, a PR that illustrates your partial progress will suffice.
|
|
@ -0,0 +1,5 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: StackOverflow
|
||||
url: https://stackoverflow.com/
|
||||
about: Please ask and answer questions here.
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: How to raise feature requests
|
||||
---
|
||||
|
||||
|
||||
Note: New issues raised, where it is clear the submitter has not read the issue template, are likely to be closed with "please read the issue template". Please don't take offense at this. It is simply a time management decision. If someone raises an issue, and can't be bothered to spend the time to read the issue template, then the project maintainers should not be expected to spend the time to read the submitted issue. Often too much time is spent going back and forth in issue comments asking for information that is outlined in the issue template.
|
||||
|
||||
If you are certain the feature will be accepted, it is better to raise a [Pull Request (PR)](https://help.github.com/articles/about-pull-requests/).
|
||||
|
||||
If you are uncertain if the feature will be accepted, outline the proposal below to confirm it is viable, prior to raising a PR that implements the feature.
|
||||
|
||||
Note that even if the feature is a good idea and viable, it may not be accepted since the ongoing effort in maintaining the feature may outweigh the benefit it delivers.
|
||||
|
||||
|
||||
#### Is the feature request related to a problem
|
||||
|
||||
A clear and concise description of what the problem is.
|
||||
|
||||
|
||||
#### Describe the solution
|
||||
|
||||
A clear and concise proposal of how you intend to implement the feature.
|
||||
|
||||
|
||||
#### Describe alternatives considered
|
||||
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
|
||||
#### Additional context
|
||||
|
||||
Add any other context about the feature request here.
|
|
@ -0,0 +1,7 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: nuget
|
||||
directory: "/src"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
|
@ -0,0 +1,16 @@
|
|||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 7
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Set to true to ignore issues in a milestone (defaults to false)
|
||||
exemptMilestones: true
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
|
||||
pulls:
|
||||
daysUntilStale: 30
|
|
@ -0,0 +1,20 @@
|
|||
name: merge-dependabot
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dependabot*
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- dependabot*
|
||||
- master
|
||||
jobs:
|
||||
automerge:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.actor == 'dependabot[bot]'
|
||||
steps:
|
||||
- name: Automerge Dependecies
|
||||
uses: "pascalgn/automerge-action@v0.14.1"
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
MERGE_LABELS: "dependencies"
|
|
@ -0,0 +1,22 @@
|
|||
name: on-push-do-docs
|
||||
on:
|
||||
push:
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run MarkdownSnippets
|
||||
run: |
|
||||
dotnet tool install --global MarkdownSnippets.Tool
|
||||
mdsnippets ${GITHUB_WORKSPACE}
|
||||
shell: bash
|
||||
- name: Push changes
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git commit -m "Docs changes" -a || echo "nothing to commit"
|
||||
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
branch="${GITHUB_REF:11}"
|
||||
git push "${remote}" ${branch} || echo "nothing to push"
|
||||
shell: bash
|
|
@ -0,0 +1,19 @@
|
|||
name: on-tag-do-release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+\.[0-9]+\.[0-9]+'
|
||||
jobs:
|
||||
release:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Run
|
||||
run: |
|
||||
dotnet tool install --global GitReleaseManager.Tool
|
||||
tag="${GITHUB_REF:10}"
|
||||
owner="${GITHUB_REPOSITORY%/*}"
|
||||
repo="${GITHUB_REPOSITORY#*/}"
|
||||
dotnet-gitreleasemanager create -m ${tag} --token ${{secrets.GITHUB_TOKEN}} -o ${owner} -r ${repo}
|
||||
dotnet-gitreleasemanager close -m ${tag} --token ${{secrets.GITHUB_TOKEN}} -o ${owner} -r ${repo}
|
||||
dotnet-gitreleasemanager publish -t ${tag} --token ${{secrets.GITHUB_TOKEN}} -o ${owner} -r ${repo}
|
||||
shell: bash
|
|
@ -1,350 +1,14 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
# Visual Studio cache directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
nugets/
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
# Approval Tests
|
||||
*.received.*
|
|
@ -0,0 +1,5 @@
|
|||
# Code of Conduct
|
||||
|
||||
This project has adopted the code of conduct defined by the Contributor Covenant
|
||||
to clarify expected behavior in our community.
|
||||
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/about/code-of-conduct).
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,63 @@
|
|||
# <img src="/src/icon.png" height="30px"> Verify.Quibble
|
||||
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/9ug1ufa69m4vf4ph?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-Quibble)
|
||||
[![NuGet Status](https://img.shields.io/nuget/v/Verify.Quibble.svg)](https://www.nuget.org/packages/Verify.Quibble/)
|
||||
|
||||
Extends [Verify](https://github.com/VerifyTests/Verify) to allow [comparison](https://github.com/VerifyTests/Verify/blob/master/docs/comparer.md) of text via [Quibble](https://github.com/nrkno/Quibble).
|
||||
|
||||
<a href='https://dotnetfoundation.org' alt='Part of the .NET Foundation'><img src='https://raw.githubusercontent.com/VerifyTests/Verify/master/docs/dotNetFoundation.svg' height='30px'></a><br>
|
||||
Part of the <a href='https://dotnetfoundation.org' alt=''>.NET Foundation</a>
|
||||
|
||||
|
||||
## NuGet package
|
||||
|
||||
https://nuget.org/packages/Verify.Quibble/
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
### Initialize
|
||||
|
||||
Call `VerifyQuibble.Initialize()` once at assembly load time.
|
||||
|
||||
|
||||
### Verify text
|
||||
|
||||
Given an existing verified file:
|
||||
|
||||
```
|
||||
The
|
||||
before
|
||||
text
|
||||
```
|
||||
|
||||
And a test:
|
||||
|
||||
```cs
|
||||
[Test]
|
||||
public async Task Sample()
|
||||
{
|
||||
var target = @"The
|
||||
after
|
||||
text";
|
||||
await Verifier.Verify(target);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Diff results
|
||||
|
||||
When the comparison fails, the resulting differences will be included in the test result displayed to the user.
|
||||
|
||||
```txt
|
||||
Results do not match.
|
||||
Differences:
|
||||
Received: Tests.Sample.received.txt
|
||||
Verified: Tests.Sample.verified.txt
|
||||
Compare Result:
|
||||
The
|
||||
- before
|
||||
+ after
|
||||
text
|
||||
```
|
|
@ -0,0 +1,77 @@
|
|||
# EditorConfig: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space:error
|
||||
|
||||
[*.cs]
|
||||
indent_size = 4:error
|
||||
charset = utf-8-bom:error
|
||||
|
||||
# Sort using and Import directives with System.* appearing first
|
||||
dotnet_sort_system_directives_first = true:error
|
||||
|
||||
# Avoid "this." and "Me." if not necessary
|
||||
dotnet_style_qualification_for_field = false:error
|
||||
dotnet_style_qualification_for_property = false:error
|
||||
dotnet_style_qualification_for_method = false:error
|
||||
dotnet_style_qualification_for_event = false:error
|
||||
|
||||
# Use language keywords instead of framework type names for type references
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:error
|
||||
dotnet_style_predefined_type_for_member_access = true:error
|
||||
|
||||
# Suggest more modern language features when available
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_coalesce_expression = false:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
|
||||
# Prefer "var" everywhere
|
||||
csharp_style_var_for_built_in_types = true:error
|
||||
csharp_style_var_when_type_is_apparent = true:error
|
||||
csharp_style_var_elsewhere = true:error
|
||||
|
||||
# Prefer method-like constructs to have a block body
|
||||
csharp_style_expression_bodied_methods = false:none
|
||||
csharp_style_expression_bodied_constructors = false:none
|
||||
csharp_style_expression_bodied_operators = false:none
|
||||
|
||||
# Prefer property-like constructs to have an expression-body
|
||||
csharp_style_expression_bodied_properties = true:suggestion
|
||||
csharp_style_expression_bodied_indexers = true:suggestion
|
||||
csharp_style_expression_bodied_accessors = true:none
|
||||
|
||||
# Suggest more modern language features when available
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:error
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:error
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
|
||||
# Newline settings
|
||||
#csharp_new_line_before_open_brace = all:error
|
||||
csharp_new_line_before_else = true:error
|
||||
csharp_new_line_before_catch = true:error
|
||||
csharp_new_line_before_finally = true:error
|
||||
csharp_new_line_before_members_in_object_initializers = true:error
|
||||
csharp_new_line_before_members_in_anonymous_types = true:error
|
||||
|
||||
#braces
|
||||
#csharp_prefer_braces = true:error
|
||||
|
||||
# msbuild
|
||||
[*.{csproj,targets,props}]
|
||||
indent_size = 2
|
||||
|
||||
# Xml files
|
||||
[*.{xml,config,nuspec,resx,vsixmanifest}]
|
||||
indent_size = 2
|
||||
resharper_xml_wrap_tags_and_pi = true:error
|
||||
|
||||
# JSON files
|
||||
[*.json]
|
||||
indent_size = 2
|
|
@ -0,0 +1,18 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.snk binary
|
||||
*.pdf binary
|
||||
*.docx binary
|
||||
*.png binary
|
||||
*.xlsx binary
|
||||
*.mpp binary
|
||||
*.msg binary
|
||||
*.one binary
|
||||
*.pptx binary
|
||||
*.ppt binary
|
||||
*.vsdx binary
|
||||
*.md binary
|
||||
|
||||
*.approved.* binary
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<NoWarn>CS1591;CS0649</NoWarn>
|
||||
<Version>0.1.0</Version>
|
||||
<AssemblyVersion>1.0.0</AssemblyVersion>
|
||||
<PackageTags>DiffPlex, Verify</PackageTags>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<Description>Extends Verify (https://github.com/VerifyTests/Verify) to allow comparison of text via DiffPlex (https://github.com/mmanela/diffplex).</Description>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"Property1": "ValueA",
|
||||
"Property2": "ValueB"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"Property1": "ValueA",
|
||||
"Property2": "ValueB"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"Type": "VerifyException",
|
||||
"StackTrace": ""
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using VerifyTests;
|
||||
using VerifyNUnit;
|
||||
using NUnit.Framework;
|
||||
|
||||
[TestFixture]
|
||||
public class Tests
|
||||
{
|
||||
record Target(string Property1, string Property2);
|
||||
|
||||
static Tests()
|
||||
{
|
||||
VerifierSettings.UseStrictJson();
|
||||
VerifyQuibble.Initialize();
|
||||
VerifierSettings.DisableClipboard();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task Simple()
|
||||
{
|
||||
var settings = new VerifySettings();
|
||||
settings.UseMethodName("Foo");
|
||||
settings.DisableDiff();
|
||||
|
||||
await Verifier.Verify(new Target("ValueA", "ValueB"), settings)
|
||||
.AutoVerify();
|
||||
|
||||
FileNameBuilder.ClearPrefixList();
|
||||
await Verifier.ThrowsTask(() =>
|
||||
Verifier.Verify(
|
||||
new Target("ValueC", "ValueD"),
|
||||
settings))
|
||||
.ScrubLinesContaining("DiffEngineTray");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task Sample()
|
||||
{
|
||||
var target = new Target("ValueA", "ValueB");
|
||||
await Verifier.Verify(target);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="MarkdownSnippets.MsBuild" Version="24.0.0" PrivateAssets="all" />
|
||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
|
||||
<PackageReference Include="Verify.NUnit" Version="11.24.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
|
||||
<ProjectReference Include="..\Verify.Quibble\Verify.Quibble.csproj" />
|
||||
<PackageReference Include="ProjectDefaults" Version="1.0.56" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29201.188
|
||||
MinimumVisualStudioVersion = 16.0.29201.188
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Verify.Quibble", "Verify.Quibble\Verify.Quibble.csproj", "{C35E31DE-40A9-45C0-817B-41BE5B7D076E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{76FE87D9-EF6B-4D31-99F2-7099C719AE99}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9A6C4741-C83D-4E05-A62F-8049F65B9B6C}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
.gitattributes = .gitattributes
|
||||
..\.gitignore = ..\.gitignore
|
||||
appveyor.yml = appveyor.yml
|
||||
Directory.Build.props = Directory.Build.props
|
||||
mdsnippets.json = mdsnippets.json
|
||||
..\readme.md = ..\readme.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C35E31DE-40A9-45C0-817B-41BE5B7D076E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C35E31DE-40A9-45C0-817B-41BE5B7D076E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C35E31DE-40A9-45C0-817B-41BE5B7D076E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C35E31DE-40A9-45C0-817B-41BE5B7D076E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{76FE87D9-EF6B-4D31-99F2-7099C719AE99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{76FE87D9-EF6B-4D31-99F2-7099C719AE99}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{76FE87D9-EF6B-4D31-99F2-7099C719AE99}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{76FE87D9-EF6B-4D31-99F2-7099C719AE99}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B0B94980-5385-4EC6-A0EE-C9A191DDFC05}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;netstandard2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nullable" Version="1.3.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Quibble" Version="0.2.110" />
|
||||
<PackageReference Include="Verify" Version="11.24.0" />
|
||||
<PackageReference Include="ProjectDefaults" Version="1.0.56" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Quibble.CSharp;
|
||||
|
||||
namespace VerifyTests
|
||||
{
|
||||
public static class VerifyQuibble
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
if (!VerifierSettings.StrictJson)
|
||||
{
|
||||
throw new("VerifyQuibble requers that VerifierSettings.UseStrictJson() is enabled");
|
||||
}
|
||||
|
||||
VerifierSettings.RegisterStringComparer(
|
||||
"json",
|
||||
(received, verified, _) =>
|
||||
{
|
||||
if (verified == string.Empty)
|
||||
{
|
||||
verified = "{}";
|
||||
}
|
||||
var list = JsonStrings.TextDiff(received, verified);
|
||||
if (!list.Any())
|
||||
{
|
||||
return Task.FromResult(CompareResult.Equal);
|
||||
}
|
||||
|
||||
var result = string.Join(Environment.NewLine, list);
|
||||
return Task.FromResult(CompareResult.NotEqual(result));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
skip_commits:
|
||||
message: /docs|Merge pull request.*/
|
||||
image:
|
||||
#- macos
|
||||
- Visual Studio 2019
|
||||
build_script:
|
||||
- dotnet build src --configuration Release
|
||||
- dotnet test src --configuration Release --no-build --no-restore --filter Category!=Integration
|
||||
on_failure:
|
||||
- ps: Get-ChildItem *.received.* -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||
test: off
|
||||
artifacts:
|
||||
- path: nugets\**\*.nupkg
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 26 KiB |
Двоичный файл не отображается.
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
|
||||
"TocExcludes": [ "NuGet package", "Release Notes", "Icon" ],
|
||||
"MaxWidth": 80,
|
||||
"Convention": "InPlaceOverwrite"
|
||||
}
|
Загрузка…
Ссылка в новой задаче