Skip to content

Commit b464027

Browse files
committed
Extracted from Fluent Assertions
0 parents  commit b464027

File tree

91 files changed

+1093224
-0
lines changed

Some content is hidden

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

91 files changed

+1093224
-0
lines changed

.editorconfig

Lines changed: 394 additions & 0 deletions
Large diffs are not rendered by default.

.gitattributes

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
*.sh text eol=lf
7+
8+
###############################################################################
9+
# Set default behavior for command prompt diff.
10+
#
11+
# This is need for earlier builds of msysgit that does not have it on by
12+
# default for csharp files.
13+
# Note: This is only used by command line
14+
###############################################################################
15+
#*.cs diff=csharp
16+
17+
###############################################################################
18+
# Set the merge driver for project and solution files
19+
#
20+
# Merging from the command prompt will add diff markers to the files if there
21+
# are conflicts (Merging from VS is not affected by the settings below, in VS
22+
# the diff markers are never inserted). Diff markers may cause the following
23+
# file extensions to fail to load in VS. An alternative would be to treat
24+
# these files as binary and thus will always conflict and require user
25+
# intervention with every merge. To do so, just uncomment the entries below
26+
###############################################################################
27+
#*.sln merge=binary
28+
#*.csproj merge=binary
29+
#*.vbproj merge=binary
30+
#*.vcxproj merge=binary
31+
#*.vcproj merge=binary
32+
#*.dbproj merge=binary
33+
#*.fsproj merge=binary
34+
#*.lsproj merge=binary
35+
#*.wixproj merge=binary
36+
#*.modelproj merge=binary
37+
#*.sqlproj merge=binary
38+
#*.wwaproj merge=binary
39+
40+
###############################################################################
41+
# behavior for image files
42+
#
43+
# image files are treated as binary by default.
44+
###############################################################################
45+
#*.jpg binary
46+
#*.png binary
47+
#*.gif binary
48+
49+
###############################################################################
50+
# diff behavior for common document formats
51+
#
52+
# Convert binary document formats to text before diffing them. This feature
53+
# is only available from the command line. Turn it on by uncommenting the
54+
# entries below.
55+
###############################################################################
56+
#*.doc diff=astextplain
57+
#*.DOC diff=astextplain
58+
#*.docx diff=astextplain
59+
#*.DOCX diff=astextplain
60+
#*.dot diff=astextplain
61+
#*.DOT diff=astextplain
62+
#*.pdf diff=astextplain
63+
#*.PDF diff=astextplain
64+
#*.rtf diff=astextplain
65+
#*.RTF diff=astextplain
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: 🐞 Bug Report
2+
description: Create a report to help us improve
3+
labels: ["bug", "triage"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
We welcome bug reports! Please see our [contribution guidelines](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#writing-a-good-bug-report) for more information on writing a good bug report.
9+
10+
**Before continuing, have you:**
11+
12+
* Tried upgrading to newest version of Fluent Assertions, to see if your issue has already been resolved and released?
13+
* Checked existing open *and* closed [issues](https://github.com/fluentassertions/fluentassertions/issues?utf8=%E2%9C%93&q=is%3Aissue), to see if the issue has already been reported?
14+
* Tried reproducing your problem in a new isolated project?
15+
* Read the [documentation](https://fluentassertions.com/introduction)?
16+
* Searched the two [test](https://github.com/fluentassertions/fluentassertions/tree/develop/Tests/FluentAssertions.Specs) [suites](https://github.com/fluentassertions/fluentassertions/tree/develop/Tests/FluentAssertions.Equivalency.Specs) if there is a test documenting the expected behavior?
17+
* Considered if this is a general question and not a bug? For general questions please use [Stack Overflow](https://stackoverflow.com/questions/tagged/fluent-assertions?mixed=1).
18+
- type: textarea
19+
id: background
20+
attributes:
21+
label: Description
22+
description: Please share a clear and concise description of the problem.
23+
placeholder: Description
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: repro-steps
28+
attributes:
29+
label: Reproduction Steps
30+
description: |
31+
Please include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or a small project, with steps to run it.
32+
Always include text as text rather than screenshots so code can easily be copied and will show up in searches.
33+
Stack Overflow has a great article about [how to create a minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).
34+
placeholder: Minimal Reproduction
35+
value: |
36+
```csharp
37+
// Arrange
38+
string input = "MyString";
39+
40+
// Act
41+
char result = input[0];
42+
43+
// Assert
44+
result.Should().Be('M');
45+
```
46+
validations:
47+
required: true
48+
- type: textarea
49+
id: expected-behavior
50+
attributes:
51+
label: Expected behavior
52+
description: |
53+
Provide a description of the expected behavior.
54+
placeholder: Expected behavior
55+
validations:
56+
required: true
57+
- type: textarea
58+
id: actual-behavior
59+
attributes:
60+
label: Actual behavior
61+
description: |
62+
Provide a description of the actual behavior observed. If applicable please include any error messages or exception stacktraces.
63+
placeholder: Actual behavior
64+
validations:
65+
required: true
66+
- type: textarea
67+
id: regression
68+
attributes:
69+
label: Regression?
70+
description: |
71+
Did this work in a previous release of Fluent Assertions? If you can try a previous release to find out, that can help us narrow down the problem. If you don't know, that's OK.
72+
placeholder: Regression?
73+
validations:
74+
required: false
75+
- type: textarea
76+
id: known-workarounds
77+
attributes:
78+
label: Known Workarounds
79+
description: |
80+
Please provide a description of any known workarounds.
81+
placeholder: Known Workarounds
82+
validations:
83+
required: false
84+
- type: textarea
85+
id: configuration
86+
attributes:
87+
label: Configuration
88+
description: |
89+
Please provide more information on your .NET configuration:
90+
* Which version of Fluent Assertions are you using?
91+
* Which .NET runtime and version are you targeting? E.g. .NET framework 4.6.1 or .NET Core 2.1.
92+
placeholder: Configuration
93+
validations:
94+
required: false
95+
- type: textarea
96+
id: other-info
97+
attributes:
98+
label: Other information
99+
description: |
100+
If you have an idea where the problem might lie, let us know that here. Please include any pointers to code, relevant changes, or related issues you know of.
101+
placeholder: Other information
102+
validations:
103+
required: false
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: 💡 API Suggestion
2+
description: Propose a change to the public API surface
3+
title: "[API Proposal]: "
4+
labels: [api-suggestion]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We welcome API proposals! We have a process to evaluate the value and shape of new API. There is an overview of our process [here](https://github.com/fluentassertions/fluentassertions/blob/develop/CONTRIBUTING.md#contributing-changes). This template will help us gather the information we need to start the review process.
10+
- type: textarea
11+
id: background
12+
attributes:
13+
label: Background and motivation
14+
description: Please describe the purpose and value of the new API here.
15+
placeholder: Purpose
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: api-proposal
20+
attributes:
21+
label: API Proposal
22+
description: |
23+
Please provide the specific public API signature diff that you are proposing.
24+
placeholder: API declaration (no method bodies)
25+
value: |
26+
```C#
27+
public class EnumAssertions<TEnum, TAssertions>
28+
{
29+
public AndConstraint<TAssertions> BeDefined(string because = "", params object[] becauseArgs);
30+
public AndConstraint<TAssertions> NotBeDefined(string because = "", params object[] becauseArgs);
31+
}
32+
```
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: api-usage
37+
attributes:
38+
label: API Usage
39+
description: |
40+
Please provide code examples that highlight how the proposed API additions are meant to be consumed. This will help suggest whether the API has the right shape to be functional, performant and usable.
41+
placeholder: API usage
42+
value: |
43+
```C#
44+
var dayOfWeek = (DayOfWeek)1;
45+
dayOfWeek.Should().BeDefined();
46+
47+
var invalidDayOfWeek = (DayOfWeek)999;
48+
invalidDayOfWeek.Should().NotBeDefined();
49+
```
50+
validations:
51+
required: true
52+
- type: textarea
53+
id: alternative-designs
54+
attributes:
55+
label: Alternative Designs
56+
description: |
57+
Please provide alternative designs. This might not be APIs; for example instead of providing new APIs an option might be to change the behavior of an existing API.
58+
placeholder: Alternative designs
59+
validations:
60+
required: false
61+
- type: textarea
62+
id: risks
63+
attributes:
64+
label: Risks
65+
description: |
66+
Please mention any risks that to your knowledge the API proposal might entail, such as breaking changes, performance regressions, etc. If you are proposing a new overload of `Should()` include what type it currently resolves to for the type in question.
67+
placeholder: Risks
68+
validations:
69+
required: false
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 💡 General feature (not including API proposals)
2+
description: Discuss a new feature that does not change the public API surface
3+
title: "[Feature]: "
4+
labels: [feature, triage]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
You have an idea for a new feature? Cool, let's discuss it.
10+
- type: textarea
11+
id: background
12+
attributes:
13+
label: Background and motivation
14+
description: Please describe the purpose of the new feature.
15+
placeholder: Purpose
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: alternative-concerns
20+
attributes:
21+
label: Alternative Concerns
22+
description: |
23+
Please provide alternatives you have thought about.
24+
placeholder: Alternative designs
25+
validations:
26+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 📚 Documentation
4+
url: https://fluentassertions.com/introduction/
5+
about: Read our comprehensive documentation.
6+
- name: ⭐ Sponsor Fluent Assertions
7+
url: https://github.com/sponsors/fluentassertions
8+
about: Help the continued development.
9+
- name: 💬 Ask on Stack Overflow
10+
url: https://stackoverflow.com/questions/tagged/fluent-assertions
11+
about: The best place for asking general purpose questions.
12+
- name: 💬 Ask on Slack
13+
url: https://fluentassertionsslack.herokuapp.com/
14+
about: Get in touch with the whole community.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Please provide a description of your changes above the IMPORTANT checklist -->
2+
3+
4+
## IMPORTANT
5+
6+
* [ ] If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
7+
* [ ] The code complies with the [Coding Guidelines for C#](https://www.csharpcodingguidelines.com/).
8+
* [ ] The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used [in these tests](../tree/develop/Tests/FluentAssertions.Equivalency.Specs/MemberMatchingSpecs.cs#L51-L430).
9+
* [ ] If the PR changes the public API the changes needs to be included by running [AcceptApiChanges.ps1](../tree/develop/AcceptApiChanges.ps1) or [AcceptApiChanges.sh](../tree/develop/AcceptApiChanges.sh).

.github/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- changelog-ignore
5+
authors: [ ]
6+
categories:
7+
- title: Breaking Changes
8+
labels:
9+
- "breaking change"
10+
- title: New features
11+
labels:
12+
- "feature"
13+
- title: Improvements
14+
labels:
15+
- "enhancement"
16+
- "performance"
17+
- title: Fixes
18+
labels:
19+
- "bug"
20+
- "regression"
21+
- title: Fixes (extensibility)
22+
labels:
23+
- "extensibility"
24+
- title: Documentation
25+
labels:
26+
- "documentation"
27+
- title: Others
28+
labels:
29+
- "*"

.github/workflows/build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: windows-latest
9+
10+
env:
11+
DOTNET_NOLOGO: true
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup .NET SDKs
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: |
22+
2.1.x
23+
3.1.x
24+
6.0.x
25+
7.0.x
26+
27+
- name: Run NUKE
28+
run: ./build.ps1
29+
env:
30+
NuGetApiKey: ${{ secrets.NUGETAPIKEY }}
31+
32+
- name: Check for 'lcov.info' existence
33+
id: check_files
34+
uses: andstor/file-existence-action@v2
35+
with:
36+
files: "TestResults/reports/lcov.info"
37+
38+
- name: coveralls
39+
uses: coverallsapp/github-action@v2
40+
if: steps.check_files.outputs.files_exists == 'true'
41+
with:
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
file: TestResults/reports/lcov.info
44+
45+
- name: Upload artifacts
46+
uses: actions/upload-artifact@v3
47+
with:
48+
path: ./Artifacts/*
49+
only-unit-tests:
50+
51+
strategy:
52+
matrix:
53+
os: [ubuntu-22.04, macos-12]
54+
55+
runs-on: ${{ matrix.os }}
56+
57+
steps:
58+
- uses: actions/checkout@v3
59+
with:
60+
fetch-depth: 0
61+
62+
- name: Setup .NET SDKs
63+
uses: actions/setup-dotnet@v3
64+
with:
65+
dotnet-version: |
66+
2.1.x
67+
3.1.x
68+
6.0.x
69+
7.0.x
70+
71+
- name: Run NUKE
72+
run: ./build.sh UnitTests

0 commit comments

Comments
 (0)