MockableStaticGenerator 0.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package MockableStaticGenerator --version 0.0.4
NuGet\Install-Package MockableStaticGenerator -Version 0.0.4
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="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
#r "nuget: MockableStaticGenerator, 0.0.4"
#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.
// 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
// 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.5 601 9/20/2022
0.0.4 567 12/7/2020