protected RepositoryTests() { InMemoryDatabase.CreateTable(); this.Context = Substitute.For <IDatabaseContext>(); this.Context.Connection.Returns(InMemoryDatabase.Connection); }
protected RepositoryTests() { var fakeDatabase = new InMemoryDatabase(); fakeDatabase.CreateTable <T>(); this.Context = Substitute.For <IDatabaseContext>(); this.Context.Connection.Returns(fakeDatabase.OpenConnection()); }