public AccountRepository(DbContext dbContext, ISelpConfiguration configuration) : base(dbContext, configuration)
 {
 }
Exemplo n.º 2
0
 public void MyTestInitialize()
 {
     configuration = new InMemoryConfiguration();
 }
Exemplo n.º 3
0
        private void InitRepositoryParams(bool isRemovingFake, ISelpConfiguration configuration = null)
        {
            var testData = new List<FakeEntity>();
            for (var i = 1; i <= 150; i++)
            {
                testData.Add(new FakeEntity
                {
                    Id = i,
                    Name = "Entity " + i,
                    Description = null,
                    IsDeleted = i > 100
                });
            }

            dbSet = TestsMockFactory.CreateDbSet(testData);

            var dbContextMock = new Mock<FakeDbContext>();
            dbContextMock
                .Setup(x => x.FakeEntities)
                .Returns(dbSet);

            repository = new FakeRepository(isRemovingFake, dbContextMock.Object, dbSet,
                configuration ?? new InMemoryConfiguration());
        }