Skip to content

feat(tests): add unit test project with 29 tests#25

Merged
ZenonEl merged 1 commit into
mainfrom
feat/tests
Mar 28, 2026
Merged

feat(tests): add unit test project with 29 tests#25
ZenonEl merged 1 commit into
mainfrom
feat/tests

Conversation

@ZenonEl
Copy link
Copy Markdown
Owner

@ZenonEl ZenonEl commented Mar 28, 2026

Summary

  • Add TelegramMediaRelayBot.Tests project (xUnit + NSubstitute)
  • 29 unit tests covering core domain types and session management

Test coverage

  • ResultTests (10) — Success, Failure, Map, Bind, Match, IsSuccess/IsFailure
  • ErrorTests (5) — factory methods, ErrorType enum, record equality
  • UserSettingsTests (8) — JSON round-trip, defaults, empty/null/invalid input, nested objects
  • UserSessionManagerTests (6) — Set/Get/Remove/ContainsKey, cleanup between tests

Closes #12

How to run

dotnet test TelegramMediaRelayBot.Tests/

Test plan

  • All 29 tests pass
  • dotnet build passes

@ZenonEl ZenonEl merged commit 8dd803f into main Mar 28, 2026
1 check passed
@ZenonEl ZenonEl deleted the feat/tests branch March 28, 2026 03:55
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.

Add unit and integration tests

1 participant