1.1 KiB
1.1 KiB
SmartPool Tests
This project contains unit tests for the SmartPool system.
Test Structure
-
Strategies/: Tests for proxy selection strategies
RandomStrategyTests.cs: Tests for random selectionAlternativeStrategyTests.cs: Tests for alternative proxy selectionProxyStrategyFactoryTests.cs: Tests for strategy factory
-
Client/: Tests for SmartPool client SDK
SmartPoolClientTests.cs: Tests for client initialization and configuration
Running Tests
# Run all tests
dotnet test
# Run with detailed output
dotnet test --logger "console;verbosity=detailed"
# Run specific test class
dotnet test --filter "FullyQualifiedName~RandomStrategyTests"
Test Coverage
The tests cover:
- Strategy selection logic
- Fallback behaviors
- Filter application
- Client initialization
- Configuration validation
Adding New Tests
When adding new strategies or features:
- Create a new test class in the appropriate folder
- Follow the existing naming convention:
{ClassName}Tests.cs - Use FluentAssertions for readable assertions
- Mock dependencies using Moq