Esempio n. 1
0
 public UsersController(IUserService userService, IMapper mapper, UserManager <User> userManager, OmxDbContext context)
 {
     this.userService = userService;
     this.mapper      = mapper;
     this.userManager = userManager;
     this.context     = context;
 }
Esempio n. 2
0
        public static OmxDbContext GetContext()
        {
            var options = new DbContextOptionsBuilder <OmxDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString()).Options;
            var dbContext = new OmxDbContext(options);

            return(dbContext);
        }
Esempio n. 3
0
 public void InitializeTests()
 {
     this.dbContext            = MockDbContext.GetContext();
     this.mapper               = MockAutoMapper.GetAutoMapper();
     this.propertyService      = new PropertyService(dbContext, mapper);
     this.mockedConfig         = new Mock <IConfiguration>();
     this.propertiesController = new PropertiesController(propertyService, mapper);
 }
Esempio n. 4
0
 public void InitializeTests()
 {
     this.dbContext       = MockDbContext.GetContext();
     this.mapper          = MockAutoMapper.GetAutoMapper();
     this.userManager     = this.TestUserManager <User>();
     this.userService     = new UserService(dbContext, mapper, userManager);
     this.mockedConfig    = new Mock <IConfiguration>();
     this.usersController = new UsersController(userService, mapper, userManager, dbContext);
 }
Esempio n. 5
0
 public IndexModel(UserManager <User> userManager,
                   SignInManager <User> signInManager,
                   IEmailSender emailSender,
                   OmxDbContext dbContext)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _emailSender   = emailSender;
     this.dbContext = dbContext;
 }
Esempio n. 6
0
 public void InitializeTests()
 {
     this.dbContext = MockDbContext.GetContext();
     this.mapper    = MockAutoMapper.GetAutoMapper();
 }
Esempio n. 7
0
 public ReportModel(OmxDbContext context, UserManager <User> userManager)
 {
     _context         = context;
     this.userManager = userManager;
 }
Esempio n. 8
0
 public UserService(OmxDbContext dbContext, IMapper mapper, UserManager <User> userManager) : base(dbContext, mapper)
 {
     this.userManager = userManager;
 }
Esempio n. 9
0
 public PropertyService(OmxDbContext dbContext, IMapper mapper) : base(dbContext, mapper)
 {
 }
Esempio n. 10
0
 protected BaseService(OmxDbContext dbContext, IMapper mapper)
 {
     DbContext = dbContext;
     Mapper    = mapper;
 }