Portamical.Core 2.0.0

dotnet add package Portamical.Core --version 2.0.0
                    
NuGet\Install-Package Portamical.Core -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Portamical.Core" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Portamical.Core" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Portamical.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Portamical.Core --version 2.0.0
                    
#r "nuget: Portamical.Core, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Portamical.Core@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Portamical.Core&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Portamical.Core&version=2.0.0
                    
Install as a Cake Tool

Portamical.Core

Portamical.Core is the framework-agnostic core of Portamical: a universal, identity-driven test data modeling framework for .NET.

Define test data once and consume it across test frameworks using adapter packages—without rewriting the data or sacrificing strong typing.


Install

dotnet add package Portamical.Core

You will typically also install a Portamical adapter package for your test framework (xUnit / MSTest / NUnit).


Example

Create reusable test data in a single place:

using static Portamical.Core.Factories.TestDataFactory;

public sealed class CalculatorCases
{
    public static IEnumerable<TestData<int, int>> Add()
    {
        yield return CreateTestData(
            definition: "adding two positive numbers",
            result: "returns their sum",
            arg1: 2,
            arg2: 3);

        yield return CreateTestData(
            definition: "adding with zero",
            result: "returns the other number",
            arg1: 0,
            arg2: 5);
    }
}

Then consume via your test framework’s adapter (usage varies by framework).


License and Project Lineage

This project is licensed under the MIT License.

Portamical.Core is the continuation and successor of CsabaDu.DynamicTestData.Core (also MIT-licensed).
CsabaDu.DynamicTestData.Core is considered legacy and is no longer supported; new development happens in Portamical.


Changelog

Version 2.0.0 (2026-03-13)

Note: This version does not introduce breaking changes in Portamical.Core itself. The major version bump to 2.0.0 aligns with the Portamical extension packages, where new versions may introduce rare breaking changes. The version number synchronization ensures consistency across the Portamical ecosystem.

Major Enhancements

Comprehensive XML Documentation

  • Added extensive XML documentation comments across the entire codebase (65 files updated)
  • Documented design patterns (Template Method, Strategy, Adapter, Decorator, Factory Method)
  • Added detailed usage examples with code samples for all public APIs
  • Included architecture diagrams and inheritance chains in documentation

Core Infrastructure Improvements

  • NamedCase:
    • Added [SuppressMessage] attributes with justifications for SonarLint rules
    • Improved CreateTestCaseName() performance using string.Create for zero-allocation concatenation
    • Enhanced Equals and GetHashCode implementations with detailed explanations
  • EnumValidator:
    • Renamed GetResultPrefixGetValidResultPrefix for clarity
  • Resolver:
    • Improved FallbackIfNullOrWhiteSpace with string.Create and CultureInfo.InvariantCulture
    • Changed Trace.WriteLineTrace.TraceWarning for better diagnostic categorization
    • Added thread-safety documentation for ResetLogCounter atomic operations
  • TestDataBase:
    • Optimized CreateTestCaseName() using string.Create (zero-copy concatenation)

T4 Template Improvements

  • SharedHelpers.ttinclude: Fixed encoding issue (BOM removed)
  • Maintained single source of truth for MaxArity = 9

Build Configuration

  • Updated version to 2.0.0
  • Cleared PackageReleaseNotes (prepared for final release notes)
  • Added PackageOutputPath configuration

Code Quality Improvements

  • Fixed typo: "Cmbines" → "Combines" in INamedCase
  • Removed unused "TrimTestCaseName" placeholders
  • Enhanced null-safety compliance throughout
  • Added ArgumentOutOfRangeException documentation where applicable
  • Improved parameter name consistency (paramName validation)

Documentation Themes

  • Design Patterns: Template Method, Strategy, Adapter, Decorator, Identity Object
  • Performance: O(n) complexity notes, zero-allocation techniques, atomic operations
  • Thread Safety: Immutability patterns, concurrent access documentation
  • Framework Integration: xUnit v2/v3, NUnit 3/4, MSTest examples
  • Migration Support: Comparisons with previous API versions

Version 1.0.0 (2026-03-04)

  • Initial release
Version 1.0.1 (2026-03-06)
  • Portamical.Core.Safety.EnumValidator.Defined: string paramName changed to not nullable type.
  • README.md replaced.
Version 1.0.2 (2026-03-07)
  • Link of migration guide (MIGRATION.md) added to README.md.
Version 1.0.3 (2026-03-08)
  • T4 Generated Code: All generated files (TestDataFactory.generated.cs, TestData.generated.cs, TestDataReturns.generated.cs, TestDataThrows.generated.cs) include explicit #nullable enable directive for enhanced null-safety compliance with C# nullable reference types.

Made by CsabaDu

Portamical: Test data as a domain, not an afterthought.


Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Portamical.Core:

Package Downloads
Portamical

Shared utilities and base classes for cross‑framework test data solutions in .NET, built on the Portamical.Core data model.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 47 3/13/2026
1.0.3 80 3/8/2026
1.0.2 80 3/7/2026
1.0.1 133 3/6/2026
1.0.0 79 3/4/2026

Note: This version does not introduce breaking changes in Portamical.Core itself. The major version bump to 2.0.0 aligns with the Portamical extension packages, where new versions may introduce rare breaking changes. The version number synchronization ensures consistency across the Portamical ecosystem.  

Major Enhancements:  
- Comprehensive XML Documentation;  
- Core Infrastructure Improvements;  
- T4 Template Improvements;  
- Build Configuration;  
- Code Quality Improvements.