AutoMoxture.NUnit 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package AutoMoxture.NUnit --version 1.0.0
NuGet\Install-Package AutoMoxture.NUnit -Version 1.0.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="AutoMoxture.NUnit" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AutoMoxture.NUnit --version 1.0.0
#r "nuget: AutoMoxture.NUnit, 1.0.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.
// Install AutoMoxture.NUnit as a Cake Addin
#addin nuget:?package=AutoMoxture.NUnit&version=1.0.0

// Install AutoMoxture.NUnit as a Cake Tool
#tool nuget:?package=AutoMoxture.NUnit&version=1.0.0

AutoMoxture

AutoMoxture provides a convenient base class to work with AutoFixture and AutoMoq so you can inherit all your test classes from it :

public class DemoServiceTests : AutoMoxtureTest<DemoService>
{
	...
}

AutoMoxture will create and expose the Sut property out of the box :

public class DemoServiceTests : AutoMoxtureTest<DemoService>
{
	...

	// Act
	var response = Sut.DemoMethod();

	...
}

AutoMoxture also inherits from AutoFixture.Fixture so AutoFixture methods are directly accessible :

public class DemoServiceTests : AutoMoxtureTest<DemoService>
{
	...

	// Create a string
	string lastName = Create<string>();

	// Create multiple strings
	IEnumerable<string> multipleLastNames = CreateMany<string>();

	// Instruct AutoFixture to always return the same string in the future
	string frozenLastName = Freeze<string>();

	// Create a custom builder for the class People
	var peopleBuilder = Build<People>().With(b => b.LastName, "Cool Last Name");

	...
}

AutoMoxture also introduces an alias method Mock<T> to quickly freeze a Mock :

public class DemoServiceTests : AutoMoxtureTest<DemoService>
{
	...

	// Regular way to freeze a Mock
	var mockOfDependency = Freeze<Mock<IDependencyOfDemoService>>();
	
	// Shorter way to freeze a Mock
	var mockOfDependency = Mock<IDependencyOfDemoService>()

	...
}

It is possible to customize the Fixture in your constructor.

public class DemoServiceTests : AutoMoxtureTest
{
    public class DemoServiceTests()
    {
        Customize<TheTypeToCustomize>(c => c.FromFactory(new MethodInvoker(new GreedyConstructorQuery())));
    }
}

This will apply to all the tests in the class. If you don't want this behavior, call the Customize method directly inside your test method.

public class DemoServiceTests : AutoMoxtureTest
{
	public void Test1()
	{
		...
		Customize<TheTypeToCustomize>(c => c.FromFactory(new MethodInvoker(new GreedyConstructorQuery())));
		...
	}
}
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 was computed. 
.NET Framework net461 was computed.  net462 was computed.  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.

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
8.0.1 230 11/12/2023
8.0.0 71 11/9/2023
7.3.2 119 10/23/2023
7.3.0 168 5/31/2023
7.2.0 150 5/28/2023
7.1.0 137 5/27/2023
7.0.3 133 5/26/2023
7.0.2 134 5/26/2023
7.0.1 136 5/26/2023
7.0.0 141 5/26/2023
4.0.3 142 5/26/2023
4.0.1 132 5/26/2023
4.0.0 146 5/26/2023
3.1.0 156 4/25/2023
3.0.3 166 4/18/2023
3.0.2 169 4/18/2023
3.0.0 159 4/18/2023
2.2.0 160 4/18/2023
2.1.3 175 4/18/2023
2.1.2 178 3/29/2023
2.1.1 194 3/29/2023
2.1.0 199 3/29/2023
2.0.0 239 2/7/2023
1.1.2 468 9/23/2022
1.1.1 451 9/23/2022
1.1.0 413 9/22/2022
1.0.0 436 9/22/2022