コード例 #1
0
 public UserManagementServiceTest()
 {
     _clock       = new FakeClock(SystemClock.Instance.GetCurrentInstant());
     _dbContext   = ApplicationDbContextHelper.BuildTestDbContext(_clock);
     _userManager = IdentityHelpers.BuildUserManager(ApplicationDbContextHelper.BuildTestDbContext(_clock));
     _roleManager = IdentityHelpers.BuildRoleManager(ApplicationDbContextHelper.BuildTestDbContext(_clock));
     _service     = new UserManagementService(_dbContext, _userManager, _roleManager, new NullLogger <UserManagementService>(), _clock);
 }
コード例 #2
0
ファイル: DashboardServiceTest.cs プロジェクト: ulfjen/SMEIoT
 public DashboardServiceTest()
 {
     _initial     = SystemClock.Instance.GetCurrentInstant();
     _dbContext   = ApplicationDbContextHelper.BuildTestDbContext();
     _userManager = IdentityHelpers.BuildUserManager(ApplicationDbContextHelper.BuildTestDbContext());
     _roleManager = IdentityHelpers.BuildRoleManager(ApplicationDbContextHelper.BuildTestDbContext());
     _service     = new DashboardService(_dbContext, _userManager);
 }
コード例 #3
0
 public SensorAssignmentServiceTest()
 {
     _dbContext   = ApplicationDbContextHelper.BuildTestDbContext();
     _userManager = IdentityHelpers.BuildUserManager(ApplicationDbContextHelper.BuildTestDbContext());
     _service     = new SensorAssignmentService(_dbContext, _userManager);
 }