MockableStaticGenerator 0.0.4

Install-Package MockableStaticGenerator -Version 0.0.4
dotnet add package MockableStaticGenerator --version 0.0.4
<PackageReference Include="MockableStaticGenerator" Version="0.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MockableStaticGenerator --version 0.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MockableStaticGenerator, 0.0.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MockableStaticGenerator as a Cake Addin
#addin nuget:?package=MockableStaticGenerator&version=0.0.4

// Install MockableStaticGenerator as a Cake Tool
#tool nuget:?package=MockableStaticGenerator&version=0.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
// For whole classes of an external assembly with a lot of static methods, like Dapper.
[MockableStatic(typeof(Dapper.DynamicParameters))]
public class StudentRepositoryTest
{
    [Fact]
    public void StudentRepositoryMoqObject()
    {
        // Dapper.MockableGenerated.ISqlMapperWrapper

        var mockConn = new Mock<IDbConnection>();
        var sut = new StudentRepository(mockConn.Object);
        var stu = sut.GetStudents();

    }
}

// For your class with some static methods.
[MockableStatic]
public class Math
{
    public static int Add(int a, int b) { return a+b; }
    public static int Sub(int a, int b) { return a+b; }
}

For more information read this article.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

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
0.0.4 351 12/7/2020