I\'ve never really done unit testing before, and I\'ve stumbled and tripped on my first test. The problem is that the _repository.Golfers.Count();
always indica
You shouldn't need to implement the get/set, the following code should be enough to generate the context for you.
public class MockGolfEntities : DbContext, IContext
{
public MockGolfEntities() {}
public IDbSet<Golfer> Golfers { get; set;}
}
I've implemeted the code you had in your original post and everything seemed to work well for me - where did you get the source for the InMemoryDbSet? I'm using the NuGet package 1.3, maybe you should try that version?