Skip to content

refactor: Namespace restructuring and unhappy path tests#77

Merged
Kiryuumaru merged 4 commits into
masterfrom
feature/namespace-refactoring
May 8, 2026
Merged

refactor: Namespace restructuring and unhappy path tests#77
Kiryuumaru merged 4 commits into
masterfrom
feature/namespace-refactoring

Conversation

@Kiryuumaru
Copy link
Copy Markdown
Owner

Summary

Comprehensive namespace refactoring to follow folder structure convention, plus extensive unhappy path test coverage.

Changes

Namespace Restructuring

All classes now follow the convention: folder path → namespace (omitting src/ and starting with NetConduit).

Folder New Namespace
src/NetConduit/Enums/ NetConduit.Enums
src/NetConduit/Events/ NetConduit.Events
src/NetConduit/Exceptions/ NetConduit.Exceptions
src/NetConduit/Interfaces/ NetConduit.Interfaces
src/NetConduit/Models/ NetConduit.Models
src/NetConduit/Transits/ NetConduit.Transits

Interface Relocation

  • Moved ITransit and IMessageTransit from Transits/ to Interfaces/ folder

New Tests

  • Added 53 unhappy path tests for API misuse scenarios:
    • ObjectDisposedException after disposal
    • InvalidOperationException for incorrect state usage
    • NotSupportedException for unsupported operations
    • ArgumentNullException for null parameters
    • Cancellation handling with OperationCanceledException
    • Double disposal safety
    • Multiplexer disposal propagation
  • Added transit eagerness tests for lazy/eager initialization patterns

Updated Imports

  • Added proper using statements across all dependent files:
    • Transport packages (Tcp, Ipc, Udp, Quic, WebSocket)
    • Sample projects
    • Unit and integration tests
  • Added GlobalUsings.cs to unit tests for common imports

Testing

  • ✅ Build succeeds with 0 errors
  • ✅ All 53 unhappy path tests pass
  • ✅ Existing tests continue to pass

- Refactor namespaces to follow folder structure convention
  - NetConduit.Enums, NetConduit.Events, NetConduit.Exceptions
  - NetConduit.Interfaces, NetConduit.Models, NetConduit.Transits
- Move ITransit and IMessageTransit to Interfaces folder
- Add 53 unhappy path tests for API misuse scenarios
- Add transit eagerness tests for lazy and eager initialization
- Update all dependent files with proper using statements
- Add GlobalUsings.cs for unit tests
@Kiryuumaru Kiryuumaru enabled auto-merge (squash) May 7, 2026 20:13
@Kiryuumaru Kiryuumaru disabled auto-merge May 7, 2026 20:13
@Kiryuumaru Kiryuumaru enabled auto-merge (squash) May 8, 2026 02:35
@Kiryuumaru Kiryuumaru disabled auto-merge May 8, 2026 02:35
@Kiryuumaru Kiryuumaru merged commit ec99092 into master May 8, 2026
16 of 22 checks passed
@Kiryuumaru Kiryuumaru deleted the feature/namespace-refactoring branch May 8, 2026 02:35
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