Skip to content

[Test] Add coverage tests ported from #372 - #415

Merged
samatstariongroup merged 1 commit into
developmentfrom
port-pr372-coverage-tests
Oct 22, 2026
Merged

samatstariongroup merged 1 commit into
developmentfrom
port-pr372-coverage-tests

Conversation

@samatstariongroup

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the COMET-SDK code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

Replaces #372, which conflicts with development and does not compile under NUnit 5. This PR adds the useful tests from #372 to the current development branch. It changes test code only and adds 21 tests.

New fixtures (from #372)

  • GuidExtensionsTestFixture: round trips for a short GUID and a short GUID array.
  • ParameterValueValidatorTestFixture: a null parameter type, a valid boolean value and an invalid boolean value.
  • AuthenticationInformationTestFixture: both constructors.
  • HttpClientExtensionsTestFixture: the Basic and bearer Authorization headers.
  • Reporting: DynamicTableCellTestFixture, ReportingParameterTestFixture, ReportingParametersTestFixture (filter string) and ReportingUtilitiesTestFixture (ToDataTable).

Added to existing fixtures

  • BooleanValueSetComparerTestFixture: falls back to string comparison when conversion fails. It runs on net48 and net10.0.
  • OpenIdConnectServiceTestFixture: the refresh-token flow, the authorization-code flow, and an error status reported as HttpRequestException. The tests use a local HttpListener as the token endpoint and also check the request path. The async asserts are awaited, as NUnit 5 requires.

Left out of #372
These tests are already covered by existing tests:

  • DAL/AvailableDalsTestFixture, already covered by Composition/AvailableDalsTestFixture.
  • The failed boolean conversion test, already covered by VerifyThatConversionToBooleanListFailsForInvalidValues.
  • The unsupported scheme test, already covered by Verify_that_RequestAuthenticationToken_throws_when_scheme_missing_ExternalJwtBearer.

Cleanup

  • Converted the files from Latin-1 to UTF-8 with BOM, which fixes "Gerené" in the headers.
  • Updated the copyright year to 2026.
  • Grouped the usings the same way as the rest of the repository.

Verification

  • The build has 0 errors.
  • With the CI filter, 2,476 tests passed and 0 failed (2,454 before).
  • The OpenID Connect tests passed in 5 out of 5 runs.

🤖 Generated with Claude Code

Ports the useful tests from #372 onto current development (NUnit 5):
- GuidExtensions short-guid round trips, ParameterValueValidator, AuthenticationInformation, HttpClientExtensions authorization header
- Reporting: DynamicTableCell, ReportingParameter, ReportingParameters filter string, ReportingUtilities.ToDataTable
- BooleanValueSetComparer string comparison fallback, added to the existing fixture
- OpenIdConnectService refresh-token flow, authorization-code flow and error status, merged into the existing fixture with awaited async asserts

Left out the tests that duplicate existing ones (AvailableDals, failed boolean conversion, unsupported scheme). Files converted to UTF-8 with BOM; usings grouped as in the rest of the repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@samatstariongroup
samatstariongroup merged commit a58426c into development Oct 22, 2026
5 checks passed
@samatstariongroup
samatstariongroup deleted the port-pr372-coverage-tests branch October 22, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant