Skip to content

Commit a4cfffc

Browse files
author
Per Kops
committed
test: update cli scenario tests after auth and response type changes
1 parent 6906fce commit a4cfffc

File tree

300 files changed

+602
-1674
lines changed

Some content is hidden

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

300 files changed

+602
-1674
lines changed

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -19,11 +19,7 @@ public interface ISetAccountNameEndpointResult : IEndpointResponse
1919

2020
bool IsBadRequest { get; }
2121

22-
bool IsUnauthorized { get; }
23-
2422
string? OkContent { get; }
2523

2624
string? BadRequestContent { get; }
27-
28-
string? UnauthorizedContent { get; }
29-
}
25+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -19,11 +19,7 @@ public interface IUpdateAccountNameEndpointResult : IEndpointResponse
1919

2020
bool IsBadRequest { get; }
2121

22-
bool IsUnauthorized { get; }
23-
2422
string? OkContent { get; }
2523

2624
string? BadRequestContent { get; }
27-
28-
string? UnauthorizedContent { get; }
29-
}
25+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -42,7 +42,6 @@ public async Task<SetAccountNameEndpointResult> ExecuteAsync(
4242
var responseBuilder = httpMessageFactory.FromResponse(response);
4343
responseBuilder.AddSuccessResponse<string?>(HttpStatusCode.OK);
4444
responseBuilder.AddErrorResponse<ValidationProblemDetails>(HttpStatusCode.BadRequest);
45-
responseBuilder.AddErrorResponse<string>(HttpStatusCode.Unauthorized);
4645
return await responseBuilder.BuildResponseAsync(x => new SetAccountNameEndpointResult(x), cancellationToken);
4746
}
48-
}
47+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -25,9 +25,6 @@ public bool IsOk
2525
public bool IsBadRequest
2626
=> StatusCode == HttpStatusCode.BadRequest;
2727

28-
public bool IsUnauthorized
29-
=> StatusCode == HttpStatusCode.Unauthorized;
30-
3128
public string? OkContent
3229
=> IsOk && ContentObject is string result
3330
? result
@@ -37,9 +34,4 @@ public string? BadRequestContent
3734
=> IsBadRequest && ContentObject is string result
3835
? result
3936
: throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first.");
40-
41-
public string? UnauthorizedContent
42-
=> IsUnauthorized && ContentObject is string result
43-
? result
44-
: throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first.");
45-
}
37+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -42,7 +42,6 @@ public async Task<UpdateAccountNameEndpointResult> ExecuteAsync(
4242
var responseBuilder = httpMessageFactory.FromResponse(response);
4343
responseBuilder.AddSuccessResponse<string?>(HttpStatusCode.OK);
4444
responseBuilder.AddErrorResponse<ValidationProblemDetails>(HttpStatusCode.BadRequest);
45-
responseBuilder.AddErrorResponse<string>(HttpStatusCode.Unauthorized);
4645
return await responseBuilder.BuildResponseAsync(x => new UpdateAccountNameEndpointResult(x), cancellationToken);
4746
}
48-
}
47+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -25,9 +25,6 @@ public bool IsOk
2525
public bool IsBadRequest
2626
=> StatusCode == HttpStatusCode.BadRequest;
2727

28-
public bool IsUnauthorized
29-
=> StatusCode == HttpStatusCode.Unauthorized;
30-
3128
public string? OkContent
3229
=> IsOk && ContentObject is string result
3330
? result
@@ -37,9 +34,4 @@ public string? BadRequestContent
3734
=> IsBadRequest && ContentObject is string result
3835
? result
3936
: throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first.");
40-
41-
public string? UnauthorizedContent
42-
=> IsUnauthorized && ContentObject is string result
43-
? result
44-
: throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first.");
45-
}
37+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -41,8 +41,7 @@ public async Task<GetAddressesByPostalCodesEndpointResult> ExecuteAsync(
4141
var responseBuilder = httpMessageFactory.FromResponse(response);
4242
responseBuilder.AddSuccessResponse<IEnumerable<Address>>(HttpStatusCode.OK);
4343
responseBuilder.AddErrorResponse<ValidationProblemDetails>(HttpStatusCode.BadRequest);
44-
responseBuilder.AddErrorResponse<string>(HttpStatusCode.Unauthorized);
45-
responseBuilder.AddErrorResponse<string>(HttpStatusCode.NotFound);
44+
responseBuilder.AddErrorResponse<string?>(HttpStatusCode.NotFound);
4645
return await responseBuilder.BuildResponseAsync(x => new GetAddressesByPostalCodesEndpointResult(x), cancellationToken);
4746
}
48-
}
47+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -25,9 +25,6 @@ public bool IsOk
2525
public bool IsBadRequest
2626
=> StatusCode == HttpStatusCode.BadRequest;
2727

28-
public bool IsUnauthorized
29-
=> StatusCode == HttpStatusCode.Unauthorized;
30-
3128
public bool IsNotFound
3229
=> StatusCode == HttpStatusCode.NotFound;
3330

@@ -41,13 +38,8 @@ public string? BadRequestContent
4138
? result
4239
: throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first.");
4340

44-
public string? UnauthorizedContent
45-
=> IsUnauthorized && ContentObject is string result
46-
? result
47-
: throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first.");
48-
4941
public string? NotFoundContent
5042
=> IsNotFound && ContentObject is string result
5143
? result
5244
: throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first.");
53-
}
45+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//------------------------------------------------------------------------------
1+
//------------------------------------------------------------------------------
22
// This code was auto-generated by ApiGenerator x.x.x.x.
33
//
44
// Changes to this file may cause incorrect behavior and will be lost if
@@ -19,15 +19,11 @@ public interface IGetAddressesByPostalCodesEndpointResult : IEndpointResponse
1919

2020
bool IsBadRequest { get; }
2121

22-
bool IsUnauthorized { get; }
23-
2422
bool IsNotFound { get; }
2523

2624
IEnumerable<Address> OkContent { get; }
2725

2826
string? BadRequestContent { get; }
2927

30-
string? UnauthorizedContent { get; }
31-
3228
string? NotFoundContent { get; }
33-
}
29+
}

test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public async Task<GetEventArgByIdEndpointResult> ExecuteAsync(
4141
var responseBuilder = httpMessageFactory.FromResponse(response);
4242
responseBuilder.AddSuccessResponse<DemoSample.ApiClient.Generated.Contracts.EventArgs.EventArgs>(HttpStatusCode.OK);
4343
responseBuilder.AddErrorResponse<ValidationProblemDetails>(HttpStatusCode.BadRequest);
44-
responseBuilder.AddErrorResponse<string>(HttpStatusCode.Unauthorized);
45-
responseBuilder.AddErrorResponse<string>(HttpStatusCode.NotFound);
44+
responseBuilder.AddErrorResponse<string?>(HttpStatusCode.NotFound);
4645
return await responseBuilder.BuildResponseAsync(x => new GetEventArgByIdEndpointResult(x), cancellationToken);
4746
}
4847
}

0 commit comments

Comments
 (0)