Esempio n. 1
0
        public TRep InitializeRepository <TRep, TDo>(IEnumerable <TDo> all) where TRep : class, IRepository <TDo>
        {
            var inMemoryRepositoryMoq = createInMemoryRepositoryMock <TRep, TDo>(all);

            var concreteInMemoryRepository = inMemoryRepositoryMoq.As <TRep>().Object;

            UnitOfWorkMoq.Setup(_makeRepositoryGetter <TRep>()).Returns(concreteInMemoryRepository);

            return(concreteInMemoryRepository);
        }
Esempio n. 2
0
 public void SetRepository <TRep, TDo>(TRep repositoryInstace) where TRep : class, IRepository <TDo>
 {
     UnitOfWorkMoq.Setup(_makeRepositoryGetter <TRep>()).Returns(repositoryInstace);
 }