Skip to content
A simple little autofaker for FakeItEasy.
C# Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.nuget
FakeItEasy.Auto.Tests
FakeItEasy.Auto
nuget-pack
.gitignore
FakeItEasy.Auto.CodeMaid.settings
FakeItEasy.Auto.sln
FakeItEasy.Auto.sln.DotSettings
FakeItEasy.Auto.v2.ncrunchsolution
LICENSE.md
NuGetPack.bat
README.md
icon.png

README.md

Build status

####Example

using FakeItEasy;
using FakeItEasy.Auto;
using NUnit.Framework;

public interface IBar
{
    void DoSomething();
}

public class Foo
{
    private readonly IBar bar;

    public Foo(IBar bar)
    {
        this.bar = bar;
    }

    public void MakeBarDoSomething()
    {
        bar.DoSomething();
    }
}

public class FooTests
{
    [Test]
    public void Can_make_bar_do_something()
    {
        // Given
        var foo = An.AutoFaked<Foo>();
        var bar = TheFake<IBar>.UsedBy(foo);
        
        // When
        foo.MakeBarDoSomething();
        
        // Then
        A.CallTo(() => bar.DoSomething()).MustHaveHappened();
    }
}
You can’t perform that action at this time.