📦 IrbyImaging.UnitTesting.csproj Documentation

File: IrbyImaging.UnitTesting/IrbyImaging.UnitTesting.csproj
Type: .NET SDK project file
Target Framework: .NET 9.0


📑 Table of Contents

  1. Overview & Purpose
  2. Project Structure & References
  3. Key Functional Areas
  4. Dependencies & Technologies
  5. Build & Run (Usage Examples)
  6. UML Component Diagram
  7. Conclusion

1. Overview & Purpose

🎯 IrbyImaging.UnitTesting is the dedicated unit-test project for the IrbyImaging solution.
It targets .NET 9.0 and is not packable (<IsPackable>false</IsPackable>), meaning it's strictly for testing and not for NuGet packaging.

  • Primary Goal: Validate business logic, data access layers, and UI behaviors through automated xUnit tests.
  • Key Features:
    • Leverages xUnit + coverlet for test execution and coverage metrics.
    • Integrates with Entity Framework Core In-Memory for isolated DB testing.
    • Utilizes Azure.Extensions & Key Vault for secure configuration.
    • Employs Selenium for end-to-end UI/browser tests.
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net9.0</TargetFramework>
    <IsPackable>false</IsPackable>
  </PropertyGroup>
  <!-- ...PackageReference and ProjectReference nodes... -->
</Project>

2. Project Structure & References

2.1 PackageReferences (Dependencies)

Category Package Version Purpose
Azure & KeyVault Azure.Extensions.AspNetCore.Configuration.SecretsAzure.Security.KeyVault.Secrets 1.3.24.7.0 Secure app settings & secrets store
Storage Azure.Storage.Blobs 12.23.0 Blob storage simulation in tests
Reporting & PDF/OCR Bold.Licensing / BoldReports.*IronOcr / IronPdf / iTextSharp 6.3.18 / 2024.x / 5.5.13.4 Validate reporting and document processing logic
Spreadsheet & CSV ClosedXML / CsvHelper / IronXL.Excel 0.104.2 / 33.0.1 / 2025.2.5 Test import/export Excel & CSV flows
ASP.NET Core & Identity Microsoft.AspNetCore.* / Microsoft.Identity.Web 9.0.0 / 3.5.0 Web authentication & UI integration testing
EF Core Microsoft.EntityFrameworkCore.* 9.0.0 In-memory & SQL Server DB context unit tests
Code Analysis Microsoft.CodeAnalysis.* 4.12.0 / 3.11.0 Roslyn analyzers – ensure code quality rules in CI
Graph & REST Microsoft.Graph / Microsoft.Rest.ClientRuntime 5.71.0 / 2.3.24 Mock calls to Microsoft Graph & Azure services
Selenium WebDriver Selenium.WebDriver / Selenium.Support / ChromeDriver 4.27.0 Browser-based UI automation tests
Test Runner & Coverage xunit / xunit.runner.visualstudio / coverlet.collector 2.9.2 / 2.8.2 / 6.0.2 Test execution & coverage reporting
…and many more (Syncfusion, Quartz, MailKit, MimeKit, etc.) Various Various Test integrations with 3rd-party libraries & services

Tip: Group dependency versions in one place to simplify upgrades.


2.2 ProjectReferences (Solution Modules)

Project Path Assembly Role in Solution
..\IrbyImaging.BusinessLogic\*.csproj IrbyImaging.BusinessLogic Core domain services & business rules
..\IrbyImaging.DbContext\*.csproj IrbyImaging.DbContext EF Core data context, migrations & repositories
..\IrbyImaging.DomainClasses\*.csproj IrbyImaging.DomainClasses POCO entities & domain models
..\IrbyImaging.Utility\*.csproj IrbyImaging.BLUtility Shared helpers, extension methods, utilities
..\IrbyImaging\IrbyImaging.UI.csproj IrbyImaging.UI ASP.NET Core MVC / Razor UI layer

3. Key Functional Areas

  1. Unit Testing Framework
    • 🧪 xUnit
    • 📊 coverlet for code coverage
  2. In‐Memory Data Stores
    • 🎲 EF Core InMemory for repository tests
  3. Integration / End‐to‐End Testing
    • 🌐 Selenium WebDriver + ChromeDriver
  4. Security & Configuration
    • 🔐 Azure Key Vault simulation
  5. Document & Report Verification
    • 📄 IronOCR, IronPDF, BoldReports
  6. Third‐Party Integrations
    • 📧 MailKit / MimeKit
    • 🔄 Microsoft Graph

4. Dependencies & Technologies

  • .NET 9.0
  • xUnit + coverlet
  • Entity Framework Core (InMemory + SQL Server)
  • Azure SDKs (Key Vault & Storage)
  • Selenium WebDriver (Chrome)
  • Roslyn Code Analysis
  • Syncfusion, IronOCR, iTextSharp
  • Quartz for scheduling scenarios
  • MailKit & MimeKit for email flows
  • ClosedXML & CsvHelper for spreadsheets & CSV

Each of these dependencies is configured in the .csproj to support specialized tests (unit, integration, performance).


5. Build & Run (Usage Examples)

# Restore all dependencies
dotnet restore IrbyImaging.UnitTesting/IrbyImaging.UnitTesting.csproj

# Build the test project
dotnet build IrbyImaging.UnitTesting/IrbyImaging.UnitTesting.csproj -c Release

# Run unit & integration tests
dotnet test IrbyImaging.UnitTesting/IrbyImaging.UnitTesting.csproj \
  --configuration Release \
  --collect:"XPlat Code Coverage"
  • The coverlet.collector integration will generate a coverage.cobertura.xml file.
  • Custom filters (e.g. exclude Program.cs) can be added via a runsettings file.

6. UML Component Diagram

Below is a simple Mermaid component diagram illustrating how the Unit Testing project ties into the rest of the solution:

graph LR
  UT[UnitTesting Project]
  BL[BusinessLogic]
  DC[DomainClasses]
  DB[DbContext]
  UTY[Utility]
  UI[UI (ASP.NET Core)]

  UT --> BL
  UT --> DB
  UT --> DC
  UT --> UTY
  UT --> UI

Legend

  • UT: IrbyImaging.UnitTesting
  • BL: Business logic layer
  • DC: Domain models
  • DB: Data access context
  • UTY: Shared utilities
  • UI: Web interface

7. Conclusion

✅ The IrbyImaging.UnitTesting project is the backbone of your automated test suite. By centralizing all test dependencies and references:

  • You ensure consistent test environments across CI/CD pipelines.
  • You enable high code coverage and quality using Roslyn analyzers and coverlet.
  • You simulate external integrations (databases, Azure services, file exports) reliably.

This documentation should help you maintain, extend, and execute your test scenarios with confidence. Good testing! 🚀