Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.18 KB

File metadata and controls

33 lines (27 loc) · 1.18 KB

EntityFramework.Testing.FakeItEasy

Simple EntityFramework FakeItEasy utility class - feel free to contribute!

Getting Started:

  • Creating fake DbSet:
var fakeDbSet = Aef.FakeDbSet(new List<Model>{...});
A.CallTo(() => context.Models).Returns(fakeDbSet);
var fakeDbSet =  Aef.FakeDbSet<Model>(55); //55 Model fakes created by FakeItEasy
A.CallTo(() => context.Models).Returns(fakeDbSet);
var fakeDbSet = Aef.FakeDbSet<Model>(); //Empty collection
A.CallTo(() => context.Models).Returns(fakeDbSet);