Kalicz.StrongTypes.FsCheck 1.1.0

dotnet add package Kalicz.StrongTypes.FsCheck --version 1.1.0
                    
NuGet\Install-Package Kalicz.StrongTypes.FsCheck -Version 1.1.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="Kalicz.StrongTypes.FsCheck" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kalicz.StrongTypes.FsCheck" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Kalicz.StrongTypes.FsCheck" />
                    
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 Kalicz.StrongTypes.FsCheck --version 1.1.0
                    
#r "nuget: Kalicz.StrongTypes.FsCheck, 1.1.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 Kalicz.StrongTypes.FsCheck@1.1.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=Kalicz.StrongTypes.FsCheck&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Kalicz.StrongTypes.FsCheck&version=1.1.0
                    
Install as a Cake Tool

Kalicz.StrongTypes.FsCheck

NuGet version Downloads License

FsCheck arbitraries for Kalicz.StrongTypes. Lets you write property tests against code that takes or returns NonEmptyString, Digit, Positive<T>, NonNegative<T>, Negative<T>, NonPositive<T>, Maybe<T>, and NonEmptyEnumerable<T> without hand-rolling generators that re-derive each type's invariants.

Install

dotnet add package Kalicz.StrongTypes.FsCheck

Register

Register everything with one attribute on your test class:

using FsCheck.Xunit;
using StrongTypes.FsCheck;

[Properties(Arbitrary = new[] { typeof(Generators) })]
public class MyTests
{
    [Property]
    public void NonEmptyString_round_trips_through_json(NonEmptyString value)
    {
        // value is guaranteed non-null, non-empty, non-whitespace
    }

    [Property]
    public void Positive_stays_positive(Positive<int> value)
    {
        Assert.True(value.Value > 0);
    }
}

What ships

Scalar strong types ship three shapes: the type itself, its nullable form (T?, ~5% null), and Maybe<T> (~5% None).

Type T T? Maybe<T>
NonEmptyString NonEmptyString NullableNonEmptyString MaybeNonEmptyString
Digit Digit NullableDigit MaybeDigit
Positive<int> PositiveInt NullablePositiveInt MaybePositiveInt
Negative<int> NegativeInt NullableNegativeInt MaybeNegativeInt
NonNegative<int> NonNegativeInt NullableNonNegativeInt MaybeNonNegativeInt
NonPositive<int> NonPositiveInt NullableNonPositiveInt MaybeNonPositiveInt

Apart from the above, you also get:

  • NonEmptyEnumerableIntNonEmptyEnumerable<int>
  • Maybe<T> for common primitives: MaybeBool, MaybeInt, MaybeLong, MaybeDouble, MaybeChar, MaybeString, MaybeGuid — all with ~5% None.

Version matches the core Kalicz.StrongTypes package you install alongside it.

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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 35 5/5/2026
1.0.1 98 4/23/2026