public void Initialize()
 {
     // Arrange.
     DbContextMock dbContextMock = new DbContextMock();
     this.EfUnitOfWork = new EfUnitOfWorkMock<PersonDataEntityMock, int>(dbContextMock);
     this.EfRepositoryMock = new EfRepositoryMock<PersonDataEntityMock,int>(this.EfUnitOfWork);
 }
Ejemplo n.º 2
0
        public void SetDbContextCorrectly_WhenParametersAreValid()
        {
            //Arrange
            var dbContextMock = new Mock <ICarManiacsDbContext>();

            //Act
            var uow = new EfUnitOfWorkMock(dbContextMock.Object);

            //Assert
            Assert.AreSame(dbContextMock.Object, uow.DbContext);
        }
 public void Cleanup()
 {
     this.EfRepositoryMock = null;
     this.EfUnitOfWork = null;
 }