Sync README files from source repository [skip ci]
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# SmartPool Tests
|
||||
|
||||
This project contains unit tests for the SmartPool system.
|
||||
|
||||
## Test Structure
|
||||
|
||||
- **Strategies/**: Tests for proxy selection strategies
|
||||
- `RandomStrategyTests.cs`: Tests for random selection
|
||||
- `AlternativeStrategyTests.cs`: Tests for alternative proxy selection
|
||||
- `ProxyStrategyFactoryTests.cs`: Tests for strategy factory
|
||||
|
||||
- **Client/**: Tests for SmartPool client SDK
|
||||
- `SmartPoolClientTests.cs`: Tests for client initialization and configuration
|
||||
|
||||
## Running Tests
|
||||
|
||||
```bash
|
||||
# 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:
|
||||
1. Create a new test class in the appropriate folder
|
||||
2. Follow the existing naming convention: `{ClassName}Tests.cs`
|
||||
3. Use FluentAssertions for readable assertions
|
||||
4. Mock dependencies using Moq
|
||||
Reference in New Issue
Block a user