Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Commit c78bd35

Browse files
committed
Copy TestableHttpClient.NFluent to their own repository.
0 parents  commit c78bd35

File tree

50 files changed

+3126
-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.

50 files changed

+3126
-0
lines changed

.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"dotnet-sonarscanner": {
6+
"version": "5.8.0",
7+
"commands": [
8+
"dotnet-sonarscanner"
9+
]
10+
}
11+
}
12+
}

.editorconfig

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
root = true
2+
3+
[*]
4+
insert_final_newline = true
5+
indent_style = space
6+
indent_size = 2
7+
trim_trailing_whitespace = true
8+
9+
[*.md]
10+
trim_trailing_whitespace = false
11+
12+
[*.cs]
13+
indent_size = 4
14+
dotnet_style_qualification_for_field = false:warning
15+
dotnet_style_qualification_for_property = false:warning
16+
dotnet_style_qualification_for_method = false:warning
17+
dotnet_style_qualification_for_event = false:warning
18+
19+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
20+
dotnet_style_predefined_type_for_member_access = true:error
21+
22+
csharp_preferred_modifier_order=public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:warning
23+
dotnet_style_require_accessibility_modifiers = always:error
24+
dotnet_style_readonly_field = true:warning
25+
csharp_prefer_static_local_function = true:warning
26+
27+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
28+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
29+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
30+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
31+
32+
dotnet_style_object_initializer = true:suggestion
33+
csharp_style_inlined_variable_declaration = true:warning
34+
dotnet_style_collection_initializer = true:suggestion
35+
dotnet_style_prefer_auto_properties = true:silent
36+
dotnet_style_explicit_tuple_names = true:suggestion
37+
csharp_prefer_simple_default_expression = true:warning
38+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
39+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
40+
csharp_style_prefer_local_over_anonymous_function = true:warning
41+
csharp_style_deconstructed_variable_declaration = true:suggestion
42+
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
43+
dotnet_style_prefer_conditional_expression_over_return = false:suggestion
44+
dotnet_style_prefer_compound_assignment = true:suggestion
45+
csharp_style_prefer_index_operator = true:suggestion
46+
csharp_style_prefer_range_operator = true:suggestion
47+
dotnet_style_prefer_simplified_boolean_expressions = true:warning
48+
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
49+
csharp_style_prefer_tuple_swap = true:warning
50+
51+
csharp_style_namespace_declarations = file_scoped
52+
53+
csharp_style_throw_expression = true:suggestion
54+
dotnet_style_coalesce_expression = true:suggestion
55+
dotnet_style_null_propagation = true:suggestion
56+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
57+
csharp_style_prefer_null_check_over_type_check = true:warning
58+
csharp_style_conditional_delegate_call = true:suggestion
59+
60+
csharp_style_var_for_built_in_types = false:suggestion
61+
csharp_style_var_when_type_is_apparent = false:suggestion
62+
csharp_style_var_elsewhere = false:suggestion
63+
64+
csharp_style_expression_bodied_constructors = false:silent
65+
csharp_style_expression_bodied_methods = false:silent
66+
csharp_style_expression_bodied_operators = false:silent
67+
csharp_style_expression_bodied_properties = true:suggestion
68+
csharp_style_expression_bodied_indexers = true:suggestion
69+
csharp_style_expression_bodied_accessors = true:suggestion
70+
csharp_style_expression_bodied_lambdas = true:silent
71+
csharp_style_expression_bodied_local_functions = false:silent
72+
73+
csharp_style_pattern_matching_over_as_with_null_check = true:warning
74+
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
75+
csharp_style_prefer_switch_expression = true:warning
76+
csharp_style_prefer_pattern_matching = true:warning
77+
csharp_style_prefer_not_pattern = true:warning
78+
csharp_style_prefer_extended_property_pattern = true:warning
79+
80+
csharp_prefer_braces = true:warning
81+
csharp_prefer_simple_using_statement = true:warning
82+
csharp_using_directive_placement = outside_namespace:error
83+
84+
file_header_template = unset
85+
86+
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
87+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
88+
dotnet_code_quality_unused_parameters = all:warning
89+
dotnet_remove_unnecessary_suppression_exclusions = all:warning
90+
91+
dotnet_sort_system_directives_first = true
92+
dotnet_separate_import_directive_groups = true
93+
dotnet_style_namespace_match_folder = true
94+
95+
# CA1303: Do not pass literals as localized parameters
96+
dotnet_diagnostic.CA1303.severity = silent

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Code example that reproduces the behavior:
15+
```
16+
[Fact]
17+
public void Issue()
18+
{
19+
...
20+
}
21+
```
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
25+
26+
**Background (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Version of library: [e.g. 22]
29+
- Version of dotnet core: [e.g. 3.1]
30+
31+
**Additional context**
32+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: GitHub Discussions
4+
url: https://github.com/testablehttpclient/TestableHttpClient/discussions
5+
about: Please ask and answer questions here
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Security vulnerability
3+
about: Create a report about a vulnerability
4+
title: ''
5+
labels: 'security vulnerability'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the vulnerability**
11+
A clear and concise description of what the vulnerability is.
12+
13+
**To Reproduce**
14+
Code example that reproduces the behavior:
15+
```
16+
[Fact]
17+
public void Issue()
18+
{
19+
...
20+
}
21+
```
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
25+
26+
**Background (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Version of library: [e.g. 22]
29+
- Version of dotnet core: [e.g. 3.1]
30+
31+
**Additional context**
32+
Add any other context about the vulnerability here.

.github/pull_request_template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Fixes # .
2+
3+
** Reminder **
4+
- Did you add unit tests?
5+
- Did you consider adding an integration test for documentation?
6+
- Did you follow the coding guidelines and run dotnet format?

.github/workflows/ci.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
DOTNET_NOLOGO: true
7+
DOTNET_CLI_TELEMETRY_OPTOUT: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Dump GitHub context
14+
env:
15+
GITHUB_CONTEXT: ${{ toJson(github) }}
16+
run: echo "$GITHUB_CONTEXT"
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
- name: Update Java SDK for SonarQube
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: '11'
25+
- name: Setup .NET versions
26+
uses: actions/setup-dotnet@v1
27+
with:
28+
dotnet-version: |
29+
6.0.x
30+
7.0.x
31+
- name: Dump .NET info
32+
run: dotnet --info
33+
- name: Restore dotnet tools
34+
run: dotnet tool restore
35+
# - name: Prepare sonarqube
36+
# if: ${{ github.actor != 'dependabot[bot]' }}
37+
# env:
38+
# SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
39+
# run: dotnet sonarscanner begin -d:sonar.host.url=https://sonarcloud.io -organization:testablehttpclient -key:testablehttpclient_TestableHttpClient -version:`dotnet nbgv get-version --variable NuGetPackageVersion` -d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml -d:sonar.login=${{env.SONAR_TOKEN}}
40+
- name: Restore dependencies
41+
run: dotnet restore
42+
- name: Build source code
43+
run: dotnet build --configuration Release --no-restore
44+
- name: Test with dotnet
45+
run: dotnet test --configuration Release --no-build --collect="Code Coverage" --framework="net6.0"
46+
# - name: Upload sonarqube results
47+
# if: ${{ github.actor != 'dependabot[bot]' }}
48+
# env:
49+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
# SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
51+
# run: dotnet sonarscanner end -d:sonar.login=${{env.SONAR_TOKEN}}
52+
- name: Check source file format
53+
run: dotnet format --no-restore --verify-no-changes
54+
- name: Pack
55+
run: dotnet pack --output ./artifacts --configuration Release --no-build
56+
- uses: actions/upload-artifact@v2
57+
with:
58+
name: artifacts
59+
path: ./artifacts
60+
- uses: actions/upload-artifact@v2
61+
with:
62+
name: coverage
63+
path: ./**/TestResults/**/coverage.opencover.xml
64+
65+
testOnSupportedDotnetVersions:
66+
strategy:
67+
matrix:
68+
os: [ubuntu-latest, windows-latest]
69+
runs-on: ${{ matrix.os }}
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v2
73+
- name: Fetch all history for all tags and branches
74+
run: git fetch --prune --unshallow
75+
- name: Setup .NET versions
76+
uses: actions/setup-dotnet@v1
77+
with:
78+
dotnet-version: |
79+
6.0.x
80+
7.0.x
81+
- name: Dump .NET info
82+
run: dotnet --info
83+
- name: Restore dependencies
84+
run: dotnet restore
85+
- name: Build source code
86+
run: dotnet build --configuration Release --no-restore
87+
- name: Test with dotnet
88+
run: dotnet test --configuration Release --no-build
89+
90+
# publish:
91+
# runs-on: ubuntu-latest
92+
# needs: build
93+
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
94+
# steps:
95+
# - name: Checkout
96+
# uses: actions/checkout@v2
97+
# - name: Setup .NET versions
98+
# uses: actions/setup-dotnet@v1
99+
# with:
100+
# dotnet-version: |
101+
# 7.0.x
102+
# - uses: actions/download-artifact@v2
103+
# with:
104+
# name: artifacts
105+
# path: ./artifacts
106+
# - name: Publish packages
107+
# env:
108+
# NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}
109+
# run: dotnet nuget push './artifacts/**/*.nupkg' --source https://api.nuget.org/v3/index.json --api-key ${{env.NUGET_TOKEN}}

0 commit comments

Comments
 (0)