TransparentMoq 4.18.1.1-u20221128-204809-ci

This is a prerelease version of TransparentMoq.
This package has a SemVer 2.0.0 package version: 4.18.1.1-u20221128-204809-ci+0a03f200d2.
There is a newer version of this package available.
See the version list below for details.
dotnet add package TransparentMoq --version 4.18.1.1-u20221128-204809-ci                
NuGet\Install-Package TransparentMoq -Version 4.18.1.1-u20221128-204809-ci                
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="TransparentMoq" Version="4.18.1.1-u20221128-204809-ci" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TransparentMoq --version 4.18.1.1-u20221128-204809-ci                
#r "nuget: TransparentMoq, 4.18.1.1-u20221128-204809-ci"                
#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 TransparentMoq as a Cake Addin
#addin nuget:?package=TransparentMoq&version=4.18.1.1-u20221128-204809-ci&prerelease

// Install TransparentMoq as a Cake Tool
#tool nuget:?package=TransparentMoq&version=4.18.1.1-u20221128-204809-ci&prerelease                

With inspiration taken from mocking frameworks like NSubstitute, FakeItEasy and JustMock this package adds some of the syntactic advantages of these frameworks to Moq.

TransparentMoq allows to use Moq without having to store mocks in Mock<T> variables, instead a T variable can be used. This also removes the need to pass mocks with ".Object" everywhere as they can be passed directly.

The library provides extension methods for most (if not all) of Moq's methods, so they can be called directly on the T variable.
Examples:
Instead of
private Mock<IFileSystem> fileSystem = new Mock<IFileSystem>();
Write
private IFileSystem fileSystem = New.Mock<IFileSystem>();

Instead of
MethodThatTakesFileSystem(fileSystem.Object);
write
MethodThatTakesFileSystem(fileSystem);

To arrange a mock everything remains the same:
fileSystem.Setup(x => x.Exists(It.IsAny<string>())).Returns(true);

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • Moq (>= 4.18.2)
  • .NETStandard 2.0

    • Moq (>= 4.18.2)
  • .NETStandard 2.1

    • Moq (>= 4.18.2)

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
4.20.70.1 108 3/12/2024
4.20.70 62 3/12/2024
4.18.2 63 3/12/2024
4.18.1.2-u20230320-164816-ci 101 3/20/2023
4.18.1.1 834 11/28/2022
4.18.1.1-u20221128-223300-ci 86 11/28/2022
4.18.1.1-u20221128-204809-ci 88 11/28/2022
4.18.1 156 11/28/2022
4.16.2.2 104 11/28/2022
4.16.2.1 438 8/21/2022
4.16.1.13 14,641 6/23/2022
4.16.1.12 215 6/19/2022
4.16.1.11 112 6/19/2022
4.16.1.10 340 6/19/2021
4.16.1.9 1,226 5/3/2021
4.16.1.8 1,227 4/24/2021
4.16.1.7 1,216 4/7/2021
4.16.1.6 1,166 4/7/2021
4.16.1.5 1,193 4/6/2021
4.16.1.4 1,192 3/29/2021
4.16.1.3 1,157 3/29/2021
4.16.1.2 1,319 3/5/2021
4.16.1.1 1,308 3/4/2021
4.16.1 1,357 2/1/2021
4.16.0 1,255 1/24/2021
4.15.2 1,451 12/6/2020
1.2.1 1,388 10/29/2020
1.2.0 1,306 10/28/2020
1.1.0 1,346 10/28/2020
1.0.0 1,502 9/27/2020