Skip to content

13 • Add support for configuration via options #13

13 • Add support for configuration via options

13 • Add support for configuration via options #13

GitHub Actions / Test Report succeeded Jun 27, 2024 in 0s

106 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
test/Cabazure.Client.IntegrationTests/TestResults/test-results.trx 53✅ 3s
test/Cabazure.Client.Runtime.Tests/TestResults/test-results.trx 25✅ 3s
test/Cabazure.Client.Tests/TestResults/test-results.trx 28✅ 7s

✅ test/Cabazure.Client.IntegrationTests/TestResults/test-results.trx

53 tests were completed in 3s with 53 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Cabazure.Client.IntegrationTests.ConfigureClientTests 4✅ 66ms
Cabazure.Client.IntegrationTests.DeleteEndpointTests 11✅ 106ms
Cabazure.Client.IntegrationTests.GetEndpointTests 13✅ 143ms
Cabazure.Client.IntegrationTests.ListEndpointTests 12✅ 151ms
Cabazure.Client.IntegrationTests.PostEndpointTests 13✅ 157ms

✅ Cabazure.Client.IntegrationTests.ConfigureClientTests

✅ Should_Register_ClientSerializer(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|002dc8c2 }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|01c5627e })
✅ Should_Register_HttpClient(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|010afcf6 }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|004e1625 })
✅ Should_Register_JsonOptions(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|02cb7c0e }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|0334503d })
✅ Should_Register_MessageRequestFactory(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|03860941 }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|0350c899 })

✅ Cabazure.Client.IntegrationTests.DeleteEndpointTests

✅ Should_Add_PathParameter(builder: Substitute.IMessageRequestBuilder|01e24713, sut: DeleteEndpoint { }, id: "idfac092de-7420-4759-9345-f5c5082123c8", cancellationToken: System.Threading.CancellationToken)
✅ Should_Configure_SuccessResponse(builder: Substitute.IMessageResponseBuilder|028b2077, sut: DeleteEndpoint { }, item: "item62a8e094-7bc1-48a0-af37-cbd1d227e256", cancellationToken: System.Threading.CancellationToken)
✅ Should_Create_Builder_From_Response(requestFactory: Substitute.IMessageRequestFactory|012ceb39, response: StatusCode: 100, ReasonPhrase: 'ReasonPhrasea3f4d9bb-87f8-4cea-af7d-0d044d9ca517', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: DeleteEndpoint { })
✅ Should_Create_HttpClient(factory: Substitute.IHttpClientFactory|02f48dc2, sut: DeleteEndpoint { })
✅ Should_Create_Request(requestFactory: Substitute.IMessageRequestFactory|01a02af3, sut: DeleteEndpoint { })
✅ Should_Create_Result(builder: Substitute.IMessageResponseBuilder|010f60f9, sut: DeleteEndpoint { }, item: "item0812fb0e-b78d-4f2d-ab7b-60d70722bcfc", cancellationToken: System.Threading.CancellationToken)
✅ Should_Get_Registered_By_AddCabazureClient(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|03d8c3f7 }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|0032f173 })
✅ Should_Implement_Interface(sut: DeleteEndpoint { })
✅ Should_Return_Result(builder: Substitute.IMessageResponseBuilder|01e7359d, sut: DeleteEndpoint { }, response: EndpointResponse { IsSuccess = False, StatusCode = SwitchingProtocols, Content = Contentf5e9e613-40c6-4b4b-a2fb-3d9b9e67b442, ContentObject = System.Object, Headers = System.Collections.ObjectModel.ReadOnlyDictionary`2[System.String,System.Collections.Generic.IEnumerable`1[System.String]], IsOk = False, IsNotFound = False, IsTimeout = False, IsBadRequest = False }, item: "item61ccf080-d865-4feb-b735-83377031247f", cancellationToken: System.Threading.CancellationToken)
✅ Should_Send_Request(client: Substitute.HttpClient|038ea39a, request: Method: method161d1209-ba37-46e5-a890-00f870dee722, RequestUri: 'http://400ea27c-dd95-4332-b673-20e4d33afd9d/', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: DeleteEndpoint { })
✅ Should_Use_Correct_HttpMethod(builder: Substitute.IMessageRequestBuilder|00988c8f, sut: DeleteEndpoint { }, id: "id9c759779-3a0b-4864-8883-2cdbec2391a3", cancellationToken: System.Threading.CancellationToken)

✅ Cabazure.Client.IntegrationTests.GetEndpointTests

✅ Should_Add_ClientRequestOptions_To_Builder(builder: Substitute.IMessageRequestBuilder|01361606, sut: GetEndpoint { }, id: "id89b61425-10e5-4186-9985-32d36f6f425a", options: ClientRequestOptions { CorrelationId = "CorrelationId9e94d457-b93a-4d64-939c-506dd039ba7c", OnBehalfOf = "OnBehalfOf021c6590-2b3f-41e2-8438-f3e53059d0a1", Timeout = 00:00:00.0000251 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Add_PathParameter(builder: Substitute.IMessageRequestBuilder|026be5c2, sut: GetEndpoint { }, id: "idfd290d84-d9d5-4701-a5d7-0c37e91bae4a", options: ClientRequestOptions { CorrelationId = "CorrelationId2704cf5d-bf75-4b7e-93d3-f7407037c8de", OnBehalfOf = "OnBehalfOf34020a43-427a-40f2-a94d-8ecfe63ed950", Timeout = 00:00:00.0000069 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Configure_SuccessResponse(builder: Substitute.IMessageResponseBuilder|007fb56a, sut: GetEndpoint { }, item: "item17e5c4bf-db7e-46f3-8ab4-8885f403f170", options: ClientRequestOptions { CorrelationId = "CorrelationId3a32e325-7261-49fe-8d44-3fc648032c8b", OnBehalfOf = "OnBehalfOfc8e32af8-6cfe-4c17-9377-0331a0080646", Timeout = 00:00:00.0000218 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Create_Builder_From_Response(requestFactory: Substitute.IMessageRequestFactory|01be5432, response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase4176cc0d-e620-49b2-9bce-45a01b182a48', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: GetEndpoint { })
✅ Should_Create_HttpClient(factory: Substitute.IHttpClientFactory|03880ba3, sut: GetEndpoint { })
✅ Should_Create_Request(requestFactory: Substitute.IMessageRequestFactory|004cb19c, sut: GetEndpoint { })
✅ Should_Create_Result(builder: Substitute.IMessageResponseBuilder|00abdf2f, sut: GetEndpoint { }, item: "itemb7e4cdc3-da2f-4129-8486-87a90b9d279c", options: ClientRequestOptions { CorrelationId = "CorrelationId0d5c7c16-d6ea-4ed1-8a15-a0334c67360a", OnBehalfOf = "OnBehalfOf2441f41a-c826-4a8e-a9bb-d6c8fe5025e3", Timeout = 00:00:00.0000173 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Get_Registered_By_AddCabazureClient(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|0314ed6e }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|00a3fed4 })
✅ Should_Implement_Interface(sut: GetEndpoint { })
✅ Should_Return_Result(builder: Substitute.IMessageResponseBuilder|025327d3, sut: GetEndpoint { }, response: EndpointResponse { IsSuccess = True, StatusCode = Processing, Content = Content2dd5eaf8-24cf-4d40-8d2c-6f47689ff529, ContentObject = System.Object, Headers = System.Collections.ObjectModel.ReadOnlyDictionary`2[System.String,System.Collections.Generic.IEnumerable`1[System.String]], IsOk = False, IsNotFound = False, IsTimeout = False, IsBadRequest = False, OkContent = OkContent18f9457b-3bd3-4914-b0af-c8b8bb651622 }, item: "item1940af53-a77d-4de5-9770-3653e73411ca", options: ClientRequestOptions { CorrelationId = "CorrelationId057f65d9-1ad3-4b02-a7b5-77a3ce61a81b", OnBehalfOf = "OnBehalfOf86def6ce-df3b-4b26-bb56-55000486c386", Timeout = 00:00:00.0000076 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Send_Request(client: Substitute.HttpClient|01207086, request: Method: methodd0c77a38-7269-4717-b923-fd0bf76c0c25, RequestUri: 'http://3c9c1049-b5b3-4e74-9550-09117e293c6c/', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: GetEndpoint { })
✅ Should_Set_Timeout_On_HttpClient(client: Substitute.HttpClient|03ab2305, sut: GetEndpoint { }, item: "item1eb3400e-f33b-4fd3-9808-e086e7a1007c", options: ClientRequestOptions { CorrelationId = "CorrelationId699420dd-cab0-46e6-9863-9edf56fa22fa", OnBehalfOf = "OnBehalfOfdd6ef85b-c76f-47b5-90d6-909bcacdf835", Timeout = 00:00:00.0000052 }, timeout: 00:00:00.0000194, cancellationToken: System.Threading.CancellationToken)
✅ Should_Use_Correct_HttpMethod(builder: Substitute.IMessageRequestBuilder|0069bc22, sut: GetEndpoint { }, id: "id9429df27-d4fd-4053-a9a5-27f10cfb87a3", options: ClientRequestOptions { CorrelationId = "CorrelationId4f338039-2842-4a92-90db-73c15693d8e8", OnBehalfOf = "OnBehalfOfc590031a-66d0-4b64-8f19-7b35279b108c", Timeout = 00:00:00.0000125 }, cancellationToken: System.Threading.CancellationToken)

✅ Cabazure.Client.IntegrationTests.ListEndpointTests

✅ Should_Add_ClientRequestOptions_To_Builder(builder: Substitute.IMessageRequestBuilder|025d4c3a, sut: ListEndpoint { }, search: "searche34bc3a2-fe97-4ac4-906d-b942601a7e62", options: ClientPaginationOptions { ContinuationToken = "ContinuationToken3e411180-a314-4d83-b2bc-c9479f38b"···, CorrelationId = "CorrelationId29908f2d-4e55-44e3-b8fa-c7fd01ae0bea", MaxItemCount = 185, OnBehalfOf = "OnBehalfOf31528224-4a1c-4206-82b1-9025fdea4110", Timeout = 00:00:00.0000212 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Add_QueryParameter(builder: Substitute.IMessageRequestBuilder|001fca2f, sut: ListEndpoint { }, search: "search868b2921-d7ae-4a5c-976f-820e99ce0eee", options: ClientPaginationOptions { ContinuationToken = "ContinuationToken7a5b694b-c123-48e7-afe9-688d53ebb"···, CorrelationId = "CorrelationId0065dcd1-36b0-4e76-924e-3a791ef8e6a6", MaxItemCount = 245, OnBehalfOf = "OnBehalfOf85d4d028-2e17-4f49-bf61-0b6d669d9eaf", Timeout = 00:00:00.0000208 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Configure_SuccessResponse(builder: Substitute.IMessageResponseBuilder|03d99665, sut: ListEndpoint { }, item: "itemd0471129-a05c-42af-90ef-686a7824cb20", options: ClientPaginationOptions { ContinuationToken = "ContinuationTokenf482eedc-87c6-4e9d-a319-7a02310bb"···, CorrelationId = "CorrelationId1e7622f8-5c29-4268-a2d6-3dfe7841b71d", MaxItemCount = 233, OnBehalfOf = "OnBehalfOfdd00ddf7-592b-4f7b-aba2-2fe23dc6b13b", Timeout = 00:00:00.0000042 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Create_Builder_From_Response(requestFactory: Substitute.IMessageRequestFactory|0110a79c, response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase5f6ca490-4af3-4de0-ab55-49373dff59b4', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: ListEndpoint { })
✅ Should_Create_HttpClient(factory: Substitute.IHttpClientFactory|0166fa07, sut: ListEndpoint { })
✅ Should_Create_Request(requestFactory: Substitute.IMessageRequestFactory|03086ca1, sut: ListEndpoint { })
✅ Should_Create_Result(builder: Substitute.IMessageResponseBuilder|03933d5f, sut: ListEndpoint { }, item: "iteme6172562-3a45-4d82-a1c3-f0fdd217fdcb", options: ClientPaginationOptions { ContinuationToken = "ContinuationToken7cb83741-b353-4964-ac6c-43b80f99d"···, CorrelationId = "CorrelationId691b7cf9-c3fc-4f93-8c10-aa5d98dca427", MaxItemCount = 223, OnBehalfOf = "OnBehalfOfd82ca6a1-f93d-4cac-9708-9ca19dd90664", Timeout = 00:00:00.0000042 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Get_Registered_By_AddCabazureClient(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|01bfcba9 }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|03b1135f })
✅ Should_Implement_Interface(sut: ListEndpoint { })
✅ Should_Return_Result(builder: Substitute.IMessageResponseBuilder|02c9e84a, sut: ListEndpoint { }, response: PagedResponse { IsSuccess = True, StatusCode = Processing, Content = Contentb99370b1-42f9-46a0-8789-7ffc4d90cb5a, ContentObject = System.Object, Headers = System.Collections.ObjectModel.ReadOnlyDictionary`2[System.String,System.Collections.Generic.IEnumerable`1[System.String]], IsOk = False, IsNotFound = False, IsTimeout = False, IsBadRequest = False, OkContent = System.String[], ContinuationToken = ContinuationToken699ac603-0cae-4814-8716-27b238115b7e }, item: "item97279288-9848-44b8-bb21-1fe3fcef9fe7", options: ClientPaginationOptions { ContinuationToken = "ContinuationTokene9c36ce5-14f2-452a-8486-b11cd636c"···, CorrelationId = "CorrelationId3708dc33-964a-4779-897a-5c87bf85f798", MaxItemCount = 169, OnBehalfOf = "OnBehalfOf9294e459-ddac-4a01-8e9b-14e125b2f4ad", Timeout = 00:00:00.0000154 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Send_Request(client: Substitute.HttpClient|009abca1, request: Method: method8eea45b2-b6ef-479c-b3b0-634454e9edee, RequestUri: 'http://606cfa68-adf8-46a4-8391-a60f49163249/', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: ListEndpoint { })
✅ Should_Set_Timeout_On_HttpClient(factory: Substitute.IHttpClientFactory|0063aebd, client: Substitute.HttpClient|006cd3e6, sut: ListEndpoint { }, item: "itemf2339312-99d3-41ad-87ec-0f7c02946af8", options: ClientPaginationOptions { ContinuationToken = "ContinuationToken7768a824-4297-4771-bc9c-f0e6c2512"···, CorrelationId = "CorrelationId9b115678-6ec8-4045-b6b5-b054644e9888", MaxItemCount = 245, OnBehalfOf = "OnBehalfOf65042129-b2a6-4844-a97a-d930f818992b", Timeout = 00:00:00.0000194 }, timeout: 00:00:00.0000040, cancellationToken: System.Threading.CancellationToken)

✅ Cabazure.Client.IntegrationTests.PostEndpointTests

✅ Should_Add_Body(builder: Substitute.IMessageRequestBuilder|03d7f9ca, sut: PostEndpoint { }, item: "item3328cbf4-19d0-4941-ae34-05927c711b16", options: ClientRequestOptions { CorrelationId = "CorrelationIdd343ee6f-af5e-41eb-8d38-2ce006e69c86", OnBehalfOf = "OnBehalfOf1b59e582-8c82-4632-add0-d946a5926434", Timeout = 00:00:00.0000023 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Add_ClientRequestOptions_To_Builder(builder: Substitute.IMessageRequestBuilder|01b82641, sut: PostEndpoint { }, item: "itemd64b8ea3-875e-447d-b7ac-f3bbf1540781", options: ClientRequestOptions { CorrelationId = "CorrelationId40def261-23bc-4139-b008-e3e686eafdeb", OnBehalfOf = "OnBehalfOfe9569d1b-d82a-4277-b20a-96c4a2645172", Timeout = 00:00:00.0000113 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Configure_SuccessResponse(builder: Substitute.IMessageResponseBuilder|00da5752, sut: PostEndpoint { }, item: "iteme1b171ae-071d-401a-aa80-2fe49f2568b8", options: ClientRequestOptions { CorrelationId = "CorrelationId225a0719-0ea7-4913-a8ac-857fac1f69f0", OnBehalfOf = "OnBehalfOfa4080f6b-77ab-4c8a-a35a-3a609e1c3f29", Timeout = 00:00:00.0000161 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Create_Builder_From_Response(requestFactory: Substitute.IMessageRequestFactory|0115a11b, response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase2b0c4b13-09af-4179-a552-9a58406d1674', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: PostEndpoint { })
✅ Should_Create_HttpClient(factory: Substitute.IHttpClientFactory|00e56b6d, sut: PostEndpoint { })
✅ Should_Create_Request(requestFactory: Substitute.IMessageRequestFactory|0096fd8c, sut: PostEndpoint { })
✅ Should_Create_Result(builder: Substitute.IMessageResponseBuilder|031f46db, sut: PostEndpoint { }, item: "item22aee298-6803-4677-b3bd-21cdcac5766c", options: ClientRequestOptions { CorrelationId = "CorrelationIdd54a613e-a5dd-4c3e-a030-1d850babf2f2", OnBehalfOf = "OnBehalfOf4dfe934c-7e11-4df9-85e8-d88623e12d24", Timeout = 00:00:00.0000222 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Get_Registered_By_AddCabazureClient(services: [···], jsonOptions: Action`1 { Method = Void Invoke(System.Text.Json.JsonSerializerOptions), Target = Substitute.Action<JsonSerializerOptions>|03560902 }, builder: Action`1 { Method = Void Invoke(Microsoft.Extensions.DependencyInjection.IHttpClientBuilder), Target = Substitute.Action<IHttpClientBuilder>|0238d9a7 })
✅ Should_Implement_Interface(sut: PostEndpoint { })
✅ Should_Return_Result(builder: Substitute.IMessageResponseBuilder|00badaf2, sut: PostEndpoint { }, response: EndpointResponse { IsSuccess = True, StatusCode = Processing, Content = Contentc57e994a-efd4-4c2f-9446-83ac9033b74f, ContentObject = System.Object, Headers = System.Collections.ObjectModel.ReadOnlyDictionary`2[System.String,System.Collections.Generic.IEnumerable`1[System.String]], IsOk = False, IsNotFound = False, IsTimeout = False, IsBadRequest = False, OkContent = OkContent8ad8eec5-d1e6-479e-ac6b-ab2f7cf26d29 }, item: "item6209b2a7-c69f-43ce-98c5-d73c70695471", options: ClientRequestOptions { CorrelationId = "CorrelationId8530456b-80b8-4c25-8279-eec38d5bc741", OnBehalfOf = "OnBehalfOf80afe1b7-451c-4d05-b57b-4e61c9950b4a", Timeout = 00:00:00.0000194 }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Send_Request(client: Substitute.HttpClient|0294140a, request: Method: method7f20467a-328a-45e6-9d8c-61203d5d6069, RequestUri: 'http://2b38dc7c-8ccd-4b3e-aff8-51563c1cecf5/', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: PostEndpoint { })
✅ Should_Set_Timeout_On_HttpClient(factory: Substitute.IHttpClientFactory|03b225cd, client: Substitute.HttpClient|035df60f, sut: PostEndpoint { }, item: "item951f5e82-e412-4956-8bcf-c3ecfe42f2d4", options: ClientRequestOptions { CorrelationId = "CorrelationId1b5715c9-694d-47e3-9c3c-f3939a9f3dcc", OnBehalfOf = "OnBehalfOf680476d4-18cc-4622-b676-8c54e2ec2b64", Timeout = 00:00:00.0000161 }, timeout: 00:00:00.0000039, cancellationToken: System.Threading.CancellationToken)
✅ Should_Use_Correct_HttpMethod(builder: Substitute.IMessageRequestBuilder|03c6395c, sut: PostEndpoint { }, id: "idfaf3fb45-d0aa-48a1-a990-a9a7ede17327", options: ClientRequestOptions { CorrelationId = "CorrelationId242bc4e7-acd4-491d-90bf-2cb022396d0a", OnBehalfOf = "OnBehalfOffd412414-0240-4223-8cc2-ac0d64706a25", Timeout = 00:00:00.0000049 }, cancellationToken: System.Threading.CancellationToken)

✅ test/Cabazure.Client.Runtime.Tests/TestResults/test-results.trx

25 tests were completed in 3s with 25 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Cabazure.Client.Runtime.Tests.Builder.MessageRequestBuilderTest 12✅ 140ms
Cabazure.Client.Runtime.Tests.Builder.MessageRequestFactoryTests 3✅ 8ms
Cabazure.Client.Runtime.Tests.Builder.MessageResponseBuilderTests 5✅ 226ms
Cabazure.Client.Tests.Authentication.AzureAuthenticationHandlerTests 1✅ 145ms
Cabazure.Client.Tests.Authentication.BearerTokenProviderTests 4✅ 176ms

✅ Cabazure.Client.Runtime.Tests.Builder.MessageRequestBuilderTest

✅ Should_Ignore_Header_When_Null_Or_Empty_Or_Whitespace(sut: MessageRequestBuilder { }, headerName: "headerNameb16a13fc-d098-48ab-bfba-780fa830c81a")
✅ Should_Include_BodyAsync(template: "template39700a2c-c427-4872-a10a-6c2479c21f23", serializer: Substitute.IClientSerializer|03debff1, clientName: "clientName5f5159cc-0cb6-497f-b80f-ea1ecb92efbd", content: "content4aed1ec1-aaf6-422a-b8c9-62656cab209d")
✅ Should_Include_Continuation_Header(sut: MessageRequestBuilder { }, options: ClientPaginationOptions { ContinuationToken = "ContinuationToken2c45915d-46d5-4f05-96c6-151fc1429"···, CorrelationId = "CorrelationId9566928d-da8b-426a-8554-243d794a2c8c", MaxItemCount = 245, OnBehalfOf = "OnBehalfOf61c30355-70fc-484a-8737-cd28748ffc34", Timeout = 00:00:00.0000038 })
✅ Should_Include_CorrelationId_Header(sut: MessageRequestBuilder { }, options: ClientRequestOptions { CorrelationId = "CorrelationIdaa0305ea-d57b-4734-82ca-9a5095ef97c0", OnBehalfOf = "OnBehalfOf7981f5a1-6d11-44cf-8955-4bbd76248474", Timeout = 00:00:00.0000189 })
✅ Should_Include_Header(sut: MessageRequestBuilder { }, headerName: "headerName1959515b-7ff4-4f07-b1e7-86242ba8c31f", headerValue: "headerValue37691bc0-287a-4a6f-94ec-a4ac1bb32a75")
✅ Should_Include_MacItemCount_Header(sut: MessageRequestBuilder { }, options: ClientPaginationOptions { ContinuationToken = "ContinuationToken91ccbf9e-829f-4659-9e0d-1288dd47f"···, CorrelationId = "CorrelationIdfde81dab-d198-480a-bff0-3f8454653146", MaxItemCount = 51, OnBehalfOf = "OnBehalfOfd30c4206-72bb-4882-8ec8-b92dab560d72", Timeout = 00:00:00.0000159 })
✅ Should_Include_OnBehalfOf_Header(sut: MessageRequestBuilder { }, options: ClientRequestOptions { CorrelationId = "CorrelationId84cdb827-f3c8-474f-9ab6-e6ec377f029d", OnBehalfOf = "OnBehalfOfe620564a-94b2-40fd-9fd9-ca00815dc97b", Timeout = 00:00:00.0000100 })
✅ Should_Replace_Path_Parameters(template: "/api/chargepoints/{chargepointId}/connectors/{conn"···, parameterValue: "parameterValuefdad9dd4-e89f-47bd-9f9d-40159147d287", serializer: Substitute.IClientSerializer|02308f08, clientName: "clientName90bca8ce-6fa5-40cb-b621-98f6fd23ddc8")
✅ Should_Replace_Query_Parameters(template: "/api/chargepoints/1232/reset", parameterValue: "parameterValuec53554ef-8433-4383-a78c-f46d1d95b889", serializer: Substitute.IClientSerializer|00d1713e, clientName: "clientName9376adc0-dab9-485e-8116-8bcc65a6ac2b")
✅ Should_Use_ApplicationJson_As_MediaType(sut: MessageRequestBuilder { })
✅ Should_Use_HttpMethod(method: method022880a5-cec5-4352-a975-6fb6a6d9deb1, sut: MessageRequestBuilder { })
✅ Should_Use_HttpVersion_20(method: methodf108f69c-3035-486c-abcb-f812eddb1829, sut: MessageRequestBuilder { })

✅ Cabazure.Client.Runtime.Tests.Builder.MessageRequestFactoryTests

✅ Should_Provide_MessageRequestBuilder_FromTemplate(template: "template6c3c8163-c315-4a06-b049-7a228c48324d", clientName: "clientName7e4c7685-b160-4eff-89a9-5e83326b8246", sut: MessageRequestFactory { })
✅ Should_Provide_MessageResponseBuilder_From_Null_Response(clientName: "clientName925f7932-a75a-44a0-8015-827876bcc510", sut: MessageRequestFactory { })
✅ Should_Provide_MessageResponseBuilder_FromResponse(response: StatusCode: 100, ReasonPhrase: 'ReasonPhrasecdd790d9-e04c-4d7a-b368-a137502cfec3', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, clientName: "clientNamea9d329d8-786e-4cc4-abaa-adddc70b2ba1", sut: MessageRequestFactory { })

✅ Cabazure.Client.Runtime.Tests.Builder.MessageResponseBuilderTests

✅ IsSuccess_Should_Respect_Configured_ErrorResponse(response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase8bdedebc-e932-457d-a8d9-0749b8962236', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: MessageResponseBuilder { }, cancellationToken: System.Threading.CancellationToken)
✅ IsSuccess_Should_Respect_Configured_SuccessResponse(response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase067a7f4b-a3a2-47fe-8bd7-45a47c3be445', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: MessageResponseBuilder { }, cancellationToken: System.Threading.CancellationToken)
✅ Should_Deserialize_Configured_ErrorResponseCode(response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase96554b91-2a40-438b-b954-2d6c7fd03d2f', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, serializer: Substitute.IClientSerializer|02993b41, sut: MessageResponseBuilder { }, expected: 2022-08-09T03:21:23.6755302+00:00, cancellationToken: System.Threading.CancellationToken)
✅ Should_Deserialize_Configured_SuccessResponseCode(response: StatusCode: 100, ReasonPhrase: 'ReasonPhrasefed40d50-ed6e-424e-b1af-40d14f2e88ac', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, serializer: Substitute.IClientSerializer|0299670e, sut: MessageResponseBuilder { }, expected: 2023-10-04T12:13:04.3989013+00:00, cancellationToken: System.Threading.CancellationToken)
✅ Should_Return_Response_Headers(response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase8b67cba5-8410-4966-b73d-fdc5ac0b5aca', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, sut: MessageResponseBuilder { }, cancellationToken: System.Threading.CancellationToken)

✅ Cabazure.Client.Tests.Authentication.AzureAuthenticationHandlerTests

✅ Should_Get_Token_On_Send(tokenProvider: Substitute.IBearerTokenProvider|004e5ae0, sut: AzureAuthenticationHandler { InnerHandler = Substitute.HttpMessageHandler|03915566 }, handler: Substitute.HttpMessageHandler|02b6afb0, authenticationHeader: scheme9e43a51a-25b1-4512-88d5-16751dbc851d, request: Method: method06817a48-ac6c-4b44-bc7b-71c5ed2d7412, RequestUri: 'http://48556e80-10c1-438e-9ef0-73e715ebf534/', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, response: StatusCode: 100, ReasonPhrase: 'ReasonPhrase95eec453-1f29-46cf-83ec-6ce76f039733', Version: 0.0, Content: Castle.Proxies.HttpContentProxy, Headers:
{
}, cancellationToken: System.Threading.CancellationToken)

✅ Cabazure.Client.Tests.Authentication.BearerTokenProviderTests

✅ Should_Renew_Expired_Token(credential: Substitute.TokenCredential|02a41ce5, dateTimeProvider: Substitute.IDateTimeProvider|01ed2494, context: Azure.Core.TokenRequestContext, sut: BearerTokenProvider { }, timestamp: 2022-08-17T16:00:16.3142524+00:00, cancellationToken: System.Threading.CancellationToken)
✅ Should_Return_Token_From_TokenCredential(credential: Substitute.TokenCredential|00089309, dateTimeProvider: Substitute.IDateTimeProvider|02b685e6, context: Azure.Core.TokenRequestContext, sut: BearerTokenProvider { }, timestamp: 2026-01-28T10:54:56.2953502+00:00, accessToken: Azure.Core.AccessToken, cancellationToken: System.Threading.CancellationToken)
✅ Should_Use_Bearer_AuthorizationToken(credential: Substitute.TokenCredential|0371c386, dateTimeProvider: Substitute.IDateTimeProvider|02fedd97, context: Azure.Core.TokenRequestContext, sut: BearerTokenProvider { }, timestamp: 2024-02-04T07:11:34.9291564+00:00, cancellationToken: System.Threading.CancellationToken)
✅ Should_Use_Cached_Token_From_TokenCredential(credential: Substitute.TokenCredential|03c05e11, dateTimeProvider: Substitute.IDateTimeProvider|03ddc3ae, context: Azure.Core.TokenRequestContext, sut: BearerTokenProvider { }, timestamp: 2022-06-28T21:11:15.4027895+00:00, cancellationToken: System.Threading.CancellationToken)

✅ test/Cabazure.Client.Tests/TestResults/test-results.trx

28 tests were completed in 7s with 28 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Cabazure.Client.Tests.ClientEndpointGeneratorTests 19✅ 3s
Cabazure.Client.Tests.ClientInitializationGeneratorTests 1✅ 2s
Cabazure.Client.Tests.GeneratorDiagnosticsTests 8✅ 2s

✅ Cabazure.Client.Tests.ClientEndpointGeneratorTests

✅ CanGenerate_CancellationToken_Parameter
✅ CanGenerate_ClientName_From_Constant
✅ CanGenerate_ClientName_From_NameOf
✅ CanGenerate_ClientPaginationOptions_Parameter
✅ CanGenerate_ClientRequestOptions_Parameter
✅ CanGenerate_DeleteEndpoint
✅ CanGenerate_FileScopedNamespace
✅ CanGenerate_GetEndpoint
✅ CanGenerate_HeaderParameter
✅ CanGenerate_NamedPathParameter
✅ CanGenerate_NamedQueryParameter
✅ CanGenerate_Namespace
✅ CanGenerate_NestedType
✅ CanGenerate_Pagination_Endpoint
✅ CanGenerate_PathParameter
✅ CanGenerate_PostEndpoint
✅ CanGenerate_PutEndpoint
✅ CanGenerate_QueryParameter
✅ CanGenerate_Usings

✅ Cabazure.Client.Tests.ClientInitializationGeneratorTests

✅ CanGenerate_GetEndpoint

✅ Cabazure.Client.Tests.GeneratorDiagnosticsTests

✅ ReportDiagnostics_When_ClientNameIsEmpty
✅ ReportDiagnostics_When_ClientNameIsEmpty_UsingAConstant
✅ ReportDiagnostics_When_EndpointHasNoMethods
✅ ReportDiagnostics_When_MissingEndpointRoute
✅ ReportDiagnostics_When_PathParameterNotInRouteTemplate
✅ ReportDiagnostics_When_RouteTemplateHasUnmappedPathParameter
✅ ReportDiagnostics_When_UnsupportedEndpointParameterType
✅ ReportDiagnostics_When_UnsupportedEndpointReturnType