Beispiel #1
0
        public ReturnOnly()
        {
            stub = new ThingStub();

            fake = A.Fake <IThingy>();
            A.CallTo(() => fake.One()).Returns(1);

            var mockSetup = new Mock <IThingy>();

            mockSetup.Setup(m => m.One()).Returns(1);
            mock = mockSetup.Object;

            sub = Substitute.For <IThingy>();
            sub.One().Returns(1);

            var rock = Rock.Create <IThingy>();

            rock.Handle(r => r.One()).Returns(1);
            chunk = rock.Make();
        }
Beispiel #2
0
 public int Rocks() => chunk.One();
Beispiel #3
0
 public int NSubstitute() => sub.One();
Beispiel #4
0
 public int Moq() => mock.One();
Beispiel #5
0
 //[Benchmark]
 public int FakeItEasy() => fake.One();
Beispiel #6
0
 public int Stub() => stub.One();