Add 156 unit tests for under-covered modules#5
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Add 156 unit tests for under-covered modules#5devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
New SharedKernel.Tests project: - ResultTests: Success/Failure factories, implicit operators, Error constants - PagedResultTests: TotalPages, HasNext/Previous, PageRequest clamping - CsvTests: RFC 4180 field quoting, row joining, document generation Infrastructure.Tests additions: - PasswordHasherTests: bcrypt hash/verify, nondeterminism, invalid hash - IdentityTokenServiceTests: sign/verify roundtrip, expiry, key validation - HooklineUserTests: role hierarchy, Anonymous/System/Authenticated factories YouTubeUploads.Tests additions: - SlackMrkdwnTests: entity expansion, HTML escapes, emoji conversion - SlackEmojiTests: shortcode mapping, skin-tone filtering, unknown passthrough - ProgressTrackerTests: Set/Get/Remove ops, Percent clamping - ApiUsageReportTests: report structure, metric summation, scope labels YouTubeComments.Tests additions: - PacificTimeTests: Today/TodayKey/StartOfToday/UntilMidnight - GoogleApiExceptionExtensionsTests: transient status, HasReason matching - PollingFrequencyTests: ToCron/ToInterval for both frequency enums Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 156 new unit tests (234 → 390 total) targeting modules that had zero or minimal test coverage.
New
Hookline.SharedKernel.Testsproject — previously untested:ResultTests—Result.Success(),Result.Failure(error),Result<T>implicit operators (T → Result<T>,Error → Result<T>), predefinedErrorstatus codesPagedResultTests—TotalPagesceiling division,HasNext/HasPreviousedge cases,PageRequest.SafePage/SafePageSizeclamping (negative, zero, >MaxPageSize),SkipoffsetCsvTests— RFC 4180Field()quoting (comma, quote, CR, LF triggers),Row()joining,Document()CRLF terminationInfrastructure.Testsadditions:PasswordHasherTests— bcrypt hash format, nondeterminism, verify correct/wrong password,SaltParseException→ false for invalid hashIdentityTokenServiceTests— constructor rejects null/empty/whitespace key,Sign→ two-part base64url token,VerifyroundtripsuserId+role, rejects tampered/wrong-key/expired tokensHooklineUserTests—HasAtLeast(role)hierarchy (Owner ≥ Admin ≥ Member),Anonymous/System/Authenticated()factory invariantsYouTubeUploads.Testsadditions:SlackMrkdwnTests— entity expansion (<@U|name>→@name,<#C|ch>→#ch,<!here>→@here,<url|label>→label (url)),&/</>decode, angle-bracket stripping, emoji shortcode pass-throughSlackEmojiTests— known shortcode → Unicode,:skin-tone-N:→ stripped, unknown codes pass through, non-emoji colons like16:9unchangedProgressTrackerTests—Set/Get/RemoveonConcurrentDictionary,JobProgress.Percentclamping (0–100,BytesTotal=0→ 0)ApiUsageReportTests—Build()produces YouTube/Drive/Slack groups, metric summation across multiple clients, Slack sorted descending, scope label resolutionYouTubeComments.Testsadditions:PacificTimeTests—Today()validity,TodayKey()format/roundtrip,StartOfToday()/UntilMidnight()boundsGoogleApiExceptionExtensionsTests—IsTransientStatus(5xx/429 = true, 4xx = false),HasReasoncase-insensitive matching, null-safePollingFrequencyTests+ReplyScanFrequencyTests—ToCron/ToIntervalenum mapping,ReplyScanFrequency.Off→ nullLink to Devin session: https://app.devin.ai/sessions/31abc6001d334122b892687c2d8e6a41
Requested by: @skyp1nus