Hi Telerik,
In JustMock documents (Entity Framework Mocking) you use :
In JustMock documents (Entity Framework Mocking) you use :
And then :IList<Dinner> FakeDinners()
to mock a DbSet. The problem is where I use " DbContext.DbSet<Dinner>.Find(2) " which gets from context or database the entity with primary key equal to 2. But in my test where I pass the FakeDinners() ,it doesn't work and return null. Looks like it doesn't know primary key inMock.Arrange(() => nerdDinners.Dinners).ReturnsCollection(FakeDinners());
FakeDinners() as it is list. So what is solution?