예제 #1
0
        protected RepositoryTests()
        {
            InMemoryDatabase.CreateTable();

            this.Context = Substitute.For <IDatabaseContext>();
            this.Context.Connection.Returns(InMemoryDatabase.Connection);
        }
예제 #2
0
        protected RepositoryTests()
        {
            var fakeDatabase = new InMemoryDatabase();

            fakeDatabase.CreateTable <T>();

            this.Context = Substitute.For <IDatabaseContext>();
            this.Context.Connection.Returns(fakeDatabase.OpenConnection());
        }