Skip to content

BenBeattieHood/csharp-generative-testing

Repository files navigation

C# Generative Testing Framework

A simple framework to allow generative testing in C#.

Using simple permutation:

    private TestData testData = new TestData(TestData.StandardPrimitives);

    [Fact]
    public void TestAdd() =>
        Run(
            testData.Test(
                method: 
                    (int a, int b) => Add(a, b),
                assert: 
                    (a, b, result) => Assert.Equal(a + b, result)
            )
        );

Using custom permutation:

    [Fact]
    public void TestAdd() =>
        Run(
            from s in new [] { null, "", "abc" }
            select Test(
                s,
                x => Console.WriteLine(x)
            )
        );

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages