示例#1
0
        public FakeDbContext GetDatabaseContext()
        {
            var databaseContext = new FakeDbContext();

            databaseContext.Database.EnsureCreated();
            return(databaseContext);
        }
示例#2
0
 public ProjectServiceTests()
 {
     context        = new FakeDbContext();
     _unitOfWork    = new UnitOfWork(context);
     _mapper        = new MapperConfiguration(c => c.AddProfile <ConfigurationMapper>()).CreateMapper();
     projectService = new ProjectService(_unitOfWork, _mapper);
     taskService    = new TaskService(_unitOfWork, _mapper);
     userService    = new UserService(_unitOfWork, _mapper);
 }