I am getting this error when I run my test: System.NotImplementedException : The member 'IQueryable.Provider' has not been implemented on type 'DbSet' ...' I saw this blog post on creating a fakeDbSet but that was before EF6. Is there a better way to handle this with EF 6?
[Test]
public void Edit_ShouldCall_DbContext_Entry()
{
//arrange
var request = Builder<EditGroupRequest>.CreateNew().Build();
fakeDbSet.Stub(x => x.FirstOrDefault(y => y.ReportGroupNameKey == request.Key)).Return(new MyObject());
//act
_sut.Edit(request);
//assert
_contextFake.AssertWasCalled(x => x.Entry(Arg<MyObject>.Is.Anything).Property(y => y.ReportGroupName).CurrentValue = request.Name);
}