ByteStudio.AutoFixture 1.0.0

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

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

AutoFixture

NuGet Packages

ByteStudio.AutoFixture

Common interfaces, attributes, and AutoFixture customizations.

ByteStudio.AutoFixture.MSTest2

Adds AutoFixture support for MSTest V2 unit tests.

Example 1 - Create test method with an AutoFixture-generated argument.

[AutoData]
public void ShouldDoSomethingGivenSomeCondition(ClassUnderTest sut)
{
    // Arrange
    // sut is auto-generated by AutoFixture.
    
    // Act
    
    // Assert
    Assert.IsNotNull(sut);
}

Example 2 - Define parameters to run for test.

[AutoData]
[InlineData(1, 2, "buckle my shoe")]
public void ShouldDoSomethingElseGivenSomeCondition(int number1, int number2, string message, ClassUnderTest sut)
{
    // Arrange
    /*
     * number1, number2, and message are all assigned from the values defined in the [InlineData] attribute. 
     * Test method parameters that are not defined in [InlineData] are auto-generated by AutoFixture.
     */
    
    // Act
    
    // Assert
    Assert.AreEqual(1, number1);
    Assert.AreEqual(2, number2);
    Assert.AreEqual("buckle my shoe", message);
    Assert.IsNotNull(sut);
}

Example 3 - Define different sets of parameters to run for the same test.

[AutoData]
[InlineData(1)]
[InlineData(2)]
[InlineData(3)]
public void ShouldDoSomethingElseGivenAnotherCondition(int number, ClassUnderTest sut)
{
    // Arrange
    /*
     * number == 1 for first test run, 2 for the second test run, and 3 for the third test run.
     * Test method parameters that are not defined in [InlineData] are auto-generated by AutoFixture.
     */
    
    // Act
    
    // Assert
    Assert.IsNotEqualTo(0, number);
    Assert.IsNotNull(sut);
}

ByteStudio.AutoFixture.AutoMoq

Adds AutoMoq behavior to AutoFixture so interface dependencies are automatically mocked.

NOTE: If a parameter is an interface or has a dependency that is an interface, then [AutoMoq] must be added to the test method so AutoFixture knows how to generate a value.

Example 1 - AutoMoq interface test parameter.

[AutoData, AutoMoq]
public void ShouldDoSomethingGivenSomeCondition(IAmAnInterface dependency, ClassUnderTest sut)
{
    // Arrange
    // `dependency` will be automatically generated as a Mock.Of<IAmAnInterface>() instance.
 
    // Act
    
    // Assert
    Assert.IsNotNull(dependency);
}
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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.5 is compatible.  netstandard1.6 was computed.  netstandard2.0 was computed.  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 tizen30 was computed.  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 (4)

Showing the top 4 NuGet packages that depend on ByteStudio.AutoFixture:

Package Downloads
ByteStudio.AutoFixture.MSTest2

Adds [AutoData] and [InlineData] attribute support to MSTest V2 unit tests.

ByteStudio.AutoFixture.Xunit2

Adds [AutoData] and [InlineAutoData] attribute support to Xunit2 unit tests.

ByteStudio.AutoFixture.AutoMoq

Adds Moq support to AutoFixture-generated test dependencies via the [AutoMoq] attribute.

ByteStudio.AutoFixture.MSTest1

Adds [AutoData] and [InlineData] attribute support to MSTest V1 unit tests.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 27,189 10/26/2022
1.1.0 3,362 8/11/2020
1.0.0 1,655 3/18/2020