Skip to content

Commit 882e685

Browse files
committed
docs: Update README with testing and GlobalUsings information
1 parent 1c3bf61 commit 882e685

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ SmartRAG is a **production-ready** .NET 9.0 library that provides a complete **R
2222
- 🎯 **Enhanced Semantic Search**: Advanced hybrid scoring with 80% semantic + 20% keyword relevance
2323
- 🔍 **Smart Document Chunking**: Word boundary validation and optimal break points for context preservation
2424
-**Enterprise Grade**: Zero Warnings Policy, SOLID principles, comprehensive logging, XML documentation
25+
- 🧹 **GlobalUsings Support**: Clean code with centralized using directives for both API and Test projects
2526

2627
## 🎯 What Makes SmartRAG Special
2728

@@ -43,6 +44,7 @@ SmartRAG is a **production-ready** .NET 9.0 library that provides a complete **R
4344
- **Dependency Injection**: Full DI container integration
4445
- **Enhanced Semantic Search**: Advanced hybrid scoring combining semantic similarity and keyword relevance
4546
- **VoyageAI Integration**: High-quality embeddings for Anthropic Claude models
47+
- **GlobalUsings Support**: Centralized using directives for clean, maintainable code
4648
- **Enterprise Architecture**: Zero Warnings Policy, SOLID/DRY principles, comprehensive XML documentation
4749
- **Production Ready**: Thread-safe operations, centralized logging, proper error handling
4850

@@ -599,6 +601,38 @@ curl -X POST "http://localhost:5000/api/search/search" \
599601
- Optimize **chunk sizes** based on your content type
600602
- Use **semantic search threshold** to filter low-relevance results
601603

604+
## 🧪 Testing
605+
606+
SmartRAG includes comprehensive testing with xUnit and follows best practices:
607+
608+
### **Test Project Structure**
609+
```
610+
tests/
611+
└── SmartRAG.Tests/
612+
├── FileUploadTests.cs # File upload functionality tests
613+
├── GlobalUsings.cs # Centralized using directives
614+
└── SmartRAG.Tests.csproj # Test project configuration
615+
```
616+
617+
### **Test Features**
618+
-**xUnit Framework**: Modern, extensible testing framework
619+
-**GlobalUsings**: Clean, maintainable test code
620+
-**File Upload Tests**: Comprehensive document upload testing
621+
-**Mock Support**: Moq integration for dependency mocking
622+
-**Async Testing**: Full async/await support
623+
624+
### **Running Tests**
625+
```bash
626+
# Run all tests
627+
dotnet test
628+
629+
# Run specific test project
630+
dotnet test tests/SmartRAG.Tests/
631+
632+
# Run tests with coverage
633+
dotnet test --collect:"XPlat Code Coverage"
634+
```
635+
602636
## 🛠️ Development
603637

604638
### **Building from Source**
@@ -610,6 +644,18 @@ dotnet build
610644
dotnet test
611645
```
612646

647+
### **Running Tests**
648+
```bash
649+
# Run all tests
650+
dotnet test
651+
652+
# Run specific test project
653+
dotnet test tests/SmartRAG.Tests/
654+
655+
# Run tests with coverage
656+
dotnet test --collect:"XPlat Code Coverage"
657+
```
658+
613659
### **Running the Sample API**
614660
```bash
615661
cd examples/WebAPI

0 commit comments

Comments
 (0)