Skip to content

Commit a7c7f24

Browse files
Fixes #5 - Fix namespaces (#7)
* Finish #5 - Fix namespaces
1 parent 1a47107 commit a7c7f24

26 files changed

+72
-63
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ jobs:
5656
uses: rocklan/dotnet-tests-report@master
5757
with:
5858
project_path: .\src\scissors.sln
59-
report_name: http_request_interceptor_test_report
60-
report_title: HttpRequestInterceptor Tests Report
59+
report_name: scissors_test_report
60+
report_title: Scissors Tests Report
6161
github_token: ${{ secrets.GITHUB_TOKEN }}
62-
gist_name: http_request_interceptor_tests.md
62+
gist_name: scissors_tests.md
6363
gist_badge_label: 'Tests passed: %Counters_passed%/%Counters_total%'
6464
gist_token: ${{ secrets.GIST_TOKEN }}
6565
set_check_status_from_test_outcome: true
6666
fail_build_on_failed_tests: true
67-
extra_test_parameters: '--configuration release --collect:"XPlat Code Coverage" --settings .\src\HttpRequestInterceptor.Test\runsettings.xml'
67+
extra_test_parameters: '--configuration release --collect:"XPlat Code Coverage" --settings .\src\Scissors.Test\runsettings.xml'
6868

6969
- name: Sonar End
7070
env:
@@ -76,6 +76,6 @@ jobs:
7676
if: github.ref == 'refs/heads/branch-zero'
7777
shell: pwsh
7878
run: |
79-
cd src\HttpRequestInterceptor
79+
cd src\Scissors
8080
dotnet pack --configuration Release
8181
dotnet nuget push ".\bin\Release\*.nupkg" --source "https://nuget.pkg.github.com/MirzaMerdovic/index.json" --api-key "${{ secrets.SCISSORS_PAT }}"

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131

3232
## [1.0.1]
3333
### Changes
34-
- Switched from Nuget package source to GitHub
34+
- Switched from Nuget package source to GitHub
35+
- Renamed project to Scissors.HttpRequestInterceptor.*
36+
37+
## [2.0.0]
38+
### Changes
39+
- Changed namespace from Scissors.HttpRequestInterceptor to Scissors
40+
- Renamed RequestsInterceptor to HttpRequestInterceptor
41+
- Renamed HttpInterceptorOptions to HttpRequestInterceptorOptions

src/HttpRequestInterceptor.Test/ComplexRoutes/ComplexRouteFixture.cs renamed to src/Scissors.Test/ComplexRoutes/ComplexRouteFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System.Collections.Generic;
22

3-
using static Scissors.HttpRequestInterceptor.Test.InMemoryConfigurationWriter;
3+
using static Scissors.Test.InMemoryConfigurationWriter;
44

5-
namespace Scissors.HttpRequestInterceptor.Test.ComplexRoutes
5+
namespace Scissors.Test.ComplexRoutes
66
{
77
public sealed class ComplexRouteFixture : TestFixture
88
{

src/HttpRequestInterceptor.Test/ComplexRoutes/ComplexRouteTests.cs renamed to src/Scissors.Test/ComplexRoutes/ComplexRouteTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Threading.Tasks;
44
using Xunit;
55

6-
namespace Scissors.HttpRequestInterceptor.Test.ComplexRoutes
6+
namespace Scissors.Test.ComplexRoutes
77
{
88
public sealed class ComplexRouteTests : IClassFixture<ComplexRouteFixture>
99
{

src/HttpRequestInterceptor.Test/HostRoutes/HostRouteFixture.cs renamed to src/Scissors.Test/HostRoutes/HostRouteFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using static Scissors.HttpRequestInterceptor.Test.InMemoryConfigurationWriter;
1+
using static Scissors.Test.InMemoryConfigurationWriter;
22

3-
namespace Scissors.HttpRequestInterceptor.Test.HostRoutes
3+
namespace Scissors.Test.HostRoutes
44
{
55
public sealed class HostRouteFixture : TestFixture
66
{

src/HttpRequestInterceptor.Test/HostRoutes/HostRouteTests.cs renamed to src/Scissors.Test/HostRoutes/HostRouteTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Threading.Tasks;
66
using Xunit;
77

8-
namespace Scissors.HttpRequestInterceptor.Test.HostRoutes
8+
namespace Scissors.Test.HostRoutes
99
{
1010
public class HostRouteTests : IClassFixture<HostRouteFixture>
1111
{
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System.Collections.Generic;
22

3-
namespace Scissors.HttpRequestInterceptor.Test
3+
namespace Scissors.Test
44
{
55
internal static class InMemoryConfigurationWriter
66
{
77
private const string Column = ":";
88
private const string Headers = "Headers";
9-
private const string SectionName = nameof(HttpInterceptorOptions) + Column;
9+
private const string SectionName = nameof(HttpRequestInterceptorOptions) + Column;
1010

1111
// HttpInterceptorOptions:0:
1212
private static string BasePath(int index) => $"{SectionName}{index}{Column}";
@@ -16,34 +16,34 @@ internal static class InMemoryConfigurationWriter
1616

1717
// HttpInterceptorOptions:0:MethodName
1818
public static KeyValuePair<string, string> BuildMethodNamePair(int index, string value) =>
19-
new($"{BasePath(index)}{nameof(HttpInterceptorOptions.MethodName)}", value);
19+
new($"{BasePath(index)}{nameof(HttpRequestInterceptorOptions.MethodName)}", value);
2020

2121
// HttpInterceptorOptions:0:Host
2222
public static KeyValuePair<string, string> BuildHostPair(int index, string value) =>
23-
new($"{BasePath(index)}{nameof(HttpInterceptorOptions.Host)}", value);
23+
new($"{BasePath(index)}{nameof(HttpRequestInterceptorOptions.Host)}", value);
2424

2525
// HttpInterceptorOptions:0:Path
2626
public static KeyValuePair<string, string> BuildPathPair(int index, string value) =>
27-
new($"{BasePath(index)}{nameof(HttpInterceptorOptions.Path)}", value);
27+
new($"{BasePath(index)}{nameof(HttpRequestInterceptorOptions.Path)}", value);
2828

2929
// HttpInterceptorOptions:0:ResponseStatusCode
3030
public static KeyValuePair<string, string> BuildReturnStatusCodePair(int index, string value) =>
31-
new($"{BasePath(index)}{nameof(HttpInterceptorOptions.ResponseStatusCode)}", value);
31+
new($"{BasePath(index)}{nameof(HttpRequestInterceptorOptions.ResponseStatusCode)}", value);
3232

3333
// HttpInterceptorOptions:0:ResponseJsonContent
3434
public static KeyValuePair<string, string> BuildReturnJsonContentPair(int index, string value) =>
35-
new($"{BasePath(index)}{nameof(HttpInterceptorOptions.ResponseJsonContent)}", value);
35+
new($"{BasePath(index)}{nameof(HttpRequestInterceptorOptions.ResponseJsonContent)}", value);
3636

3737
// HttpInterceptorOptions:0:Rank
3838
public static KeyValuePair<string, string> BuildRankPair(int index, string value) =>
39-
new($"{BasePath(index)}{nameof(HttpInterceptorOptions.Rank)}", value);
39+
new($"{BasePath(index)}{nameof(HttpRequestInterceptorOptions.Rank)}", value);
4040

4141
// HttpInterceptorOptions:0:Headers:0:Name
4242
public static KeyValuePair<string, string> BuildResponseHeaderNamePair(int parentIndex, int index, string value) =>
43-
new($"{BasePath(parentIndex)}{BaseHeaderPath(index)}{nameof(HttpInterceptorOptions.HttpResponseHeader.Name)}", value);
43+
new($"{BasePath(parentIndex)}{BaseHeaderPath(index)}{nameof(HttpRequestInterceptorOptions.HttpResponseHeader.Name)}", value);
4444

4545
// HttpInterceptorOptions:0:Headers:0:Value
4646
public static KeyValuePair<string, string> BuildResponseHeaderValuePair(int parentIndex, int index, string value) =>
47-
new($"{BasePath(parentIndex)}{BaseHeaderPath(index)}{nameof(HttpInterceptorOptions.HttpResponseHeader.Value)}", value);
47+
new($"{BasePath(parentIndex)}{BaseHeaderPath(index)}{nameof(HttpRequestInterceptorOptions.HttpResponseHeader.Value)}", value);
4848
}
4949
}

src/HttpRequestInterceptor.Test/RankedRoutes/RankedRouteFixture.cs renamed to src/Scissors.Test/RankedRoutes/RankedRouteFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using static Scissors.HttpRequestInterceptor.Test.InMemoryConfigurationWriter;
1+
using static Scissors.Test.InMemoryConfigurationWriter;
22

3-
namespace Scissors.HttpRequestInterceptor.Test.RankedRoutes
3+
namespace Scissors.Test.RankedRoutes
44
{
55
public class RankedRouteFixture : TestFixture
66
{

src/HttpRequestInterceptor.Test/RankedRoutes/RankedRouteTests.cs renamed to src/Scissors.Test/RankedRoutes/RankedRouteTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Threading.Tasks;
55
using Xunit;
66

7-
namespace Scissors.HttpRequestInterceptor.Test.RankedRoutes
7+
namespace Scissors.Test.RankedRoutes
88
{
99
public sealed class RankedRouteTests : IClassFixture<RankedRouteFixture>
1010
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using static Scissors.HttpRequestInterceptor.Test.InMemoryConfigurationWriter;
1+
using static Scissors.Test.InMemoryConfigurationWriter;
22

3-
namespace Scissors.HttpRequestInterceptor.Test.ResponseContents
3+
namespace Scissors.Test.ResponseContents
44
{
55
public sealed class ResponseContentFixture : TestFixture
66
{

0 commit comments

Comments
 (0)