Skip to content

Commit 946572e

Browse files
author
Dennis Doomen
committed
Merge branch 'develop'
2 parents 8bc58e8 + ebee22a commit 946572e

File tree

224 files changed

+4997
-1413
lines changed

Some content is hidden

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

224 files changed

+4997
-1413
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 46 deletions
This file was deleted.
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

.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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
## IMPORTANT
22

3+
* [ ] If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
34
* [ ] The code complies with the [Coding Guidelines for C#](https://www.csharpcodingguidelines.com/).
45
* [ ] 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).
56
* [ ] If the PR adds a feature or fixes a bug, please update [the release notes](../tree/develop/docs/_pages/releases.md) with a functional description that explains what the change means to consumers of this library, which are published on the [website](https://fluentassertions.com/releases).
67
* [ ] 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).
7-
* [ ] If the PR affects [the documentation](../tree/develop/docs/_pages), please include your changes in this pull request so the documentation will appear on the [website](https://www.fluentassertions.com/introduction).
8+
* [ ] If the PR affects [the documentation](../tree/develop/docs/_pages), please include your changes in this pull request so the documentation will appear on the [website](https://www.fluentassertions.com/introduction).
9+
* [ ] Please also run `./build.sh --target spellcheck` or `.\build.ps1 --target spellcheck` before pushing and check the good outcome

.github/workflows/build.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: build
22

3-
on:
4-
pull_request:
5-
paths-ignore:
6-
- docs/**
7-
push:
8-
paths-ignore:
9-
- docs/**
3+
on: [push, pull_request]
104

115
jobs:
126
build:
@@ -28,12 +22,14 @@ jobs:
2822
2.1.x
2923
3.1.x
3024
6.0.x
25+
7.0.x
3126
3227
- name: Run NUKE
3328
run: ./build.ps1
3429
env:
3530
BranchSpec: ${{ github.ref }}
3631
BuildNumber: ${{ github.run_number }}
32+
PullRequestBase: ${{ github.event.pull_request.base.ref }}
3733
ApiKey: ${{ secrets.NUGETAPIKEY }}
3834

3935
- name: coveralls
@@ -46,3 +42,29 @@ jobs:
4642
uses: actions/upload-artifact@v3
4743
with:
4844
path: ./Artifacts/*
45+
only-unit-tests:
46+
47+
strategy:
48+
matrix:
49+
os: [ubuntu-22.04, macos-12]
50+
51+
runs-on: ${{ matrix.os }}
52+
53+
steps:
54+
- uses: actions/checkout@v3
55+
with:
56+
fetch-depth: 0
57+
58+
- name: Setup .NET SDKs
59+
uses: actions/setup-dotnet@v3
60+
with:
61+
dotnet-version: |
62+
2.1.x
63+
3.1.x
64+
6.0.x
65+
7.0.x
66+
67+
- name: Run NUKE
68+
run: ./build.sh UnitTests
69+
env:
70+
BaseRef: ${{ github.event.pull_request.base.ref }}

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*.sln.docstates
88
*.sln.ide
99
.vs/
10-
10+
.vscode/
1111

1212
project.lock.json
1313
*.nuget.props
@@ -187,4 +187,7 @@ docs/node_modules
187187
Tests/FluentAssertions.Specs/FluentAssertions.Specs.xml
188188

189189
# BenchmarkDotNet
190-
Tests/Benchmarks/BenchmarkDotNet.Artifacts/
190+
Tests/Benchmarks/BenchmarkDotNet.Artifacts/
191+
192+
# Documentation spell check
193+
node_modules/

.nuke/build.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
"type": "string"
6767
}
6868
},
69+
"PullRequestBase": {
70+
"type": "string",
71+
"description": "The target branch for the pull request"
72+
},
6973
"Root": {
7074
"type": "string",
7175
"description": "Root directory during build execution"
@@ -84,6 +88,7 @@
8488
"Pack",
8589
"Push",
8690
"Restore",
91+
"SpellCheck",
8792
"TestFrameworks",
8893
"UnitTests"
8994
]
@@ -107,6 +112,7 @@
107112
"Pack",
108113
"Push",
109114
"Restore",
115+
"SpellCheck",
110116
"TestFrameworks",
111117
"UnitTests"
112118
]

0 commit comments

Comments
 (0)