Beispiel #1
0
 public void Setup()
 {
     _userManager        = Substitute.For <FakeUserManager>();
     _studyDbContext     = Substitute.For <StudyDbContext>(new DbContextOptions <StudyDbContext>());
     _registerController = new RegisterController(_userManager, _studyDbContext);
     _user          = new User();
     _user.UserName = "******";
     _user.Email    = "*****@*****.**";
 }
 public void Setup()
 {
     _userManager     = Substitute.For <FakeUserManager>();
     _studyDbContext  = Substitute.For <StudyDbContext>(new DbContextOptions <StudyDbContext>());
     _signInManager   = Substitute.For <FakeSignInManager>();
     _loginController = new LoginController(_studyDbContext, _userManager, _signInManager);
     _login           = new Login();
     _login.Username  = "******";
     _login.Password  = "******";
 }
Beispiel #3
0
        public static void SeedHostDb(StudyDbContext context)
        {
            context.SuppressAutoSetTenantId = true;

            // Host seed
            new InitialHostDbBuilder(context).Create();

            // Default tenant seed (in host database).
            new DefaultTenantBuilder(context).Create();
            new TenantRoleAndUserBuilder(context, 1).Create();
        }
Beispiel #4
0
 public DefaultSettingsCreator(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #5
0
 public TenantRoleAndUserBuilder(StudyDbContext context, int tenantId)
 {
     _context  = context;
     _tenantId = tenantId;
 }
Beispiel #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 public AccountController(StudyDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Beispiel #7
0
 public FileController(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #8
0
 public UserService(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #9
0
 public StudyController(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #10
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="appSettings"></param>
 public AuthController(IOptions <AppAuthenticationSettings> appSettings, StudyDbContext dbContext)
 {
     _appSettings = appSettings.Value;
     _dbContext   = dbContext;
 }
 public UserRoleSever(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #12
0
 public UserController(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #13
0
 public DefaultEditionCreator(StudyDbContext context)
 {
     _context = context;
 }
 public GroupController(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #15
0
 public InitialHostDbBuilder(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #16
0
 public MenuSever(StudyDbContext context)
 {
     _context = context;
 }
 public HostRoleAndUserCreator(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #18
0
 public DefaultTenantBuilder(StudyDbContext context)
 {
     _context = context;
 }
 public LoginController(StudyDbContext context, UserManager <User> userManager, SignInManager <User> signInManager)
 {
     _userManager   = userManager;
     _context       = context;
     _signInManager = signInManager;
 }
 public RegisterController(UserManager <User> userManager, StudyDbContext context)
 {
     _context     = context;
     _userManager = userManager;
 }
Beispiel #21
0
 public RoleClaimsSever(StudyDbContext context)
 {
     _context = context;
 }
 public TopicController(StudyDbContext context)
 {
     _context = context;
 }
Beispiel #23
0
 public DefaultLanguagesCreator(StudyDbContext context)
 {
     _context = context;
 }