private NewsService GetNewsServiceWithTestData()
        {
            var context = DbContextProvider.GetInMemoryDbContext();

            PopulateData(context);
            return(new NewsService(context));
        }
Exemple #2
0
 public FileServiceTests()
 {
     _dbContext = DbContextProvider.GetInMemoryDbContext();
     _imageStorageServiceMock = new Mock <IImageStorageService>();
     _fileService             = new FileService(
         _dbContext,
         _imageStorageServiceMock.Object);
 }
        public UsersServiceTests()
        {
            _userManagerMock = IdentityMocksProvider.GetMockUserManager();
            _jwtFactoryMock  = new Mock <IJwtFactory>();
            _mapperMock      = new Mock <IMapper>();
            _dbContext       = DbContextProvider.GetInMemoryDbContext();

            _usersService = new UsersService(
                _dbContext,
                _userManagerMock.Object,
                _jwtFactoryMock.Object,
                _mapperMock.Object);
        }
 private INewsService GetNewsService()
 => new NewsService(DbContextProvider.GetInMemoryDbContext());
 public TagsServiceTests()
 {
     _dbContext   = DbContextProvider.GetInMemoryDbContext();
     _tagsService = new TagsService(_dbContext);
 }