public void SetUp() { FakeDi.Register(); _repoUnit = new RepoUnit(); _rules = new UsersRules(_repoUnit); _generator = new SequentialGenerator<DateTime> { Direction = GeneratorDirection.Ascending }; }
public HomeService(UsersRules rules, RepoUnit unit, EventSavingService calendarEventService) { _savingService = calendarEventService; _rules = rules; _unit = unit; var users = unit.User.Load(); if (!users.Any()) { var defaultUser = new User { BirthDate = null, Email = "Admin", FirstName = "Admin", LastName = "Admin", Role = Roles.Admin, PasswordHash = "Admin", PasswordSalt = "", Live = LiveStatuses.Active, ApproveState = ApproveStates.Approved }; unit.User.Save(defaultUser); } }