Пример #1
0
        public MockDbContextTests()
        {
            var dbMock = MockDbContext.For <TestDbContext>();

            dbMock.Add(x => x.Persons, people)
            .Add(x => x.Dogs, dogs);
            db = dbMock.Create();
        }
Пример #2
0
        public MockMyUses()
        {
            var users = new[] { new SecUser {
                                    UserId = 1, FirstName = "Test", Surname = "User", UserName = "******"
                                } };

            db = MockDbContext.For <MusketeerDbContext>().Add(x => x.Users, users).Create();
        }